diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-02-01 18:52:04 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-02-01 18:52:04 (GMT) |
commit | 593c213f16fc47264519a1e73c682c5910c716d5 (patch) | |
tree | 517ab32dffe3aae0b167d96bd9d06a80c144f5e6 /Modules | |
parent | 16186ec18c0654d6fc2a9018553df53390bb9ff2 (diff) | |
download | CMake-593c213f16fc47264519a1e73c682c5910c716d5.zip CMake-593c213f16fc47264519a1e73c682c5910c716d5.tar.gz CMake-593c213f16fc47264519a1e73c682c5910c716d5.tar.bz2 |
BUG: When preserving relative paths for moc generated files,
also consider paths to headers in the build directory.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 92f160b..a9d0815 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -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) |