BUG: When preserving relative paths for moc generated files,
also consider paths to headers in the build directory.
This commit is contained in:
parent
16186ec18c
commit
593c213f16
|
@ -903,7 +903,12 @@ IF (QT4_QMAKE_FOUND)
|
|||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
STRING(REGEX MATCH "${CMAKE_CURRENT_BINARY_DIR}" _match ${infile})
|
||||
IF(_match)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_match)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_match)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
|
|
Loading…
Reference in New Issue