diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-02 21:51:51 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-02 21:51:51 (GMT) |
commit | 98a5bbd3aa30e77d5e3637ff6b981abe85ce5210 (patch) | |
tree | e3a31957363512bc1164e1657fc11ea5d2a17a83 /Modules/FindQt4.cmake | |
parent | 4925e64b97b46b7248b7fe7ffa9fb215ca2d460f (diff) | |
download | CMake-98a5bbd3aa30e77d5e3637ff6b981abe85ce5210.zip CMake-98a5bbd3aa30e77d5e3637ff6b981abe85ce5210.tar.gz CMake-98a5bbd3aa30e77d5e3637ff6b981abe85ce5210.tar.bz2 |
ENH: fix depend bug in qt
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index cecdac8..7b4633c 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -866,13 +866,18 @@ IF (QT4_QMAKE_FOUND) GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) GET_FILENAME_COMPONENT(rc_path ${infile} PATH) SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx) - # parse file for dependencies + # parse file for dependencies + # all files are absolute paths or relative to the location of the qrc file FILE(READ "${infile}" _RC_FILE_CONTENTS) STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}") SET(_RC_DEPENDS) FOREACH(_RC_FILE ${_RC_FILES}) STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}") - SET(_RC_DEPENDS ${_RC_DEPENDS} "${rc_path}/${_RC_FILE}") + STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") + IF(NOT _ABS_PATH_INDICATOR) + SET(_RC_FILE "${rc_path}/${_RC_FILE}") + ENDIF(NOT _ABS_PATH_INDICATOR) + SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") ENDFOREACH(_RC_FILE) ADD_CUSTOM_COMMAND(OUTPUT ${outfile} COMMAND ${QT_RCC_EXECUTABLE} |