summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4Macros.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-23 14:16:58 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-23 14:16:58 (GMT)
commitca9c287d1aae9cd7d4ce32c2c91b951bc13a39a5 (patch)
treeb9e315c69a9aa9493b0f976ae6829ebb4f1ba521 /Modules/Qt4Macros.cmake
parent8c64702c97a21d702021b2a095b5f9b0f79c9ef6 (diff)
parent3553001bcc425dfb5d84a2dc8d657fe92c007962 (diff)
downloadCMake-ca9c287d1aae9cd7d4ce32c2c91b951bc13a39a5.zip
CMake-ca9c287d1aae9cd7d4ce32c2c91b951bc13a39a5.tar.gz
CMake-ca9c287d1aae9cd7d4ce32c2c91b951bc13a39a5.tar.bz2
Merge topic 'Qt4Macros-fix-resource-parsing'
3553001 Qt4Macros: Fix recently broken resource file parsing
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r--Modules/Qt4Macros.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 7c9dc9e..8e8680c 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -187,15 +187,17 @@ macro (QT4_ADD_RESOURCES outfiles )
if(EXISTS "${infile}")
# parse file for dependencies
# all files are absolute paths or relative to the location of the qrc file
- file(STRINGS "${infile}" _RC_FILES REGEX "<file[^>]*>[^<]+")
- foreach(_RC_FILE IN LISTS _RC_FILES)
- string(REGEX REPLACE "^<file[^>]*>([^<]*)" "\\1" _RC_FILE "${_RC_FILE}")
+ file(STRINGS "${infile}" _RC_FILE_CONTENTS REGEX "<file[^>]*>[^<]+")
+ string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+ foreach(_RC_FILE ${_RC_FILES})
+ string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
if(NOT IS_ABSOLUTE "${_RC_FILE}")
set(_RC_FILE "${rc_path}/${_RC_FILE}")
endif()
set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
endforeach()
unset(_RC_FILES)
+ unset(_RC_FILE_CONTENTS)
# Since this cmake macro is doing the dependency scanning for these files,
# let's make a configured file and add it as a dependency so cmake is run
# again when dependencies need to be recomputed.