mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
BUG: When preserving relative paths for moc generated files,
also consider paths to headers in the build directory.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user