Merge topic 'Qt4Macros-fix-resource-parsing'

42bfc5a Read entire Qt4 qrc file when parsing for depends info.
This commit is contained in:
David Cole 2012-09-04 15:47:33 -04:00 committed by CMake Topic Stage
commit 1f2694f52e
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ macro (QT4_ADD_RESOURCES outfiles )
if(EXISTS "${infile}") if(EXISTS "${infile}")
# parse file for dependencies # parse file for dependencies
# all files are absolute paths or relative to the location of the qrc file # all files are absolute paths or relative to the location of the qrc file
file(STRINGS "${infile}" _RC_FILE_CONTENTS REGEX "<file[^>]*>[^<]+") file(READ "${infile}" _RC_FILE_CONTENTS)
string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}") string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
foreach(_RC_FILE ${_RC_FILES}) foreach(_RC_FILE ${_RC_FILES})
string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}") string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")