ENH: fix depend bug in qt
This commit is contained in:
parent
4925e64b97
commit
98a5bbd3aa
|
@ -866,13 +866,18 @@ IF (QT4_QMAKE_FOUND)
|
||||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
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)
|
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||||
SET(_RC_DEPENDS)
|
SET(_RC_DEPENDS)
|
||||||
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}")
|
||||||
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)
|
ENDFOREACH(_RC_FILE)
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||||
COMMAND ${QT_RCC_EXECUTABLE}
|
COMMAND ${QT_RCC_EXECUTABLE}
|
||||||
|
|
Loading…
Reference in New Issue