[cmake-commits] clinton committed FindQt4.cmake 1.89 1.90
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Feb 1 13:52:07 EST 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv13590
Modified Files:
FindQt4.cmake
Log Message:
BUG: When preserving relative paths for moc generated files,
also consider paths to headers in the build directory.
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- FindQt4.cmake 29 Jan 2008 22:01:00 -0000 1.89
+++ FindQt4.cmake 1 Feb 2008 18:52:04 -0000 1.90
@@ -903,7 +903,12 @@
# 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)
More information about the Cmake-commits
mailing list