[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.23 1.24
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Feb 24 09:00:46 EST 2009
Update of /cvsroot/CMake/CMake/Utilities
In directory public:/mounts/ram/cvs-serv26374/Utilities
Modified Files:
CMakeLists.txt
Log Message:
ENH: Help cmake-gui docs generation on Windows
We use a custom command to run 'cmake-gui --help...' to generate the
documentation for the application. Since this is a Qt application, the
executable must find the Qt DLLs in order to run. As a convenience, if
QtCore4.dll appears next to qmake.exe, we put its location in the PATH
environment variable when running the custom command on Windows.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/CMakeLists.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** CMakeLists.txt 14 Feb 2009 02:51:45 -0000 1.23
--- CMakeLists.txt 24 Feb 2009 14:00:42 -0000 1.24
***************
*** 13,16 ****
--- 13,17 ----
ADD_CUSTOM_COMMAND(
OUTPUT ${CMake_BINARY_DIR}/Docs/${target}.txt
+ ${${target}-PATH} # Possibly set PATH, see below.
COMMAND ${CMD}
ARGS --help-full ${CMake_BINARY_DIR}/Docs/${target}.txt
***************
*** 31,34 ****
--- 32,45 ----
ENDMACRO(ADD_DOCS target dependency)
+ # Help cmake-gui find the Qt DLLs on Windows.
+ IF(BUILD_QtDialog AND WIN32 AND EXISTS "${QT_QMAKE_EXECUTABLE}")
+ GET_FILENAME_COMPONENT(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
+ IF(EXISTS "${Qt_BIN_DIR}/QtCore4.dll")
+ # Tell the macro to set the path before running cmake-gui.
+ STRING(REPLACE ";" "\\;" _PATH "PATH=${Qt_BIN_DIR};%PATH%")
+ SET(cmake-gui-PATH COMMAND set "${_PATH}")
+ ENDIF(EXISTS "${Qt_BIN_DIR}/QtCore4.dll")
+ ENDIF(BUILD_QtDialog AND WIN32 AND EXISTS "${QT_QMAKE_EXECUTABLE}")
+
# add the docs for the executables
ADD_DOCS(ctest ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt)
More information about the Cmake-commits
mailing list