diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-07 17:05:08 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-07 17:05:08 (GMT) |
commit | ca3a61359541c770fb9ca0ccab83b49fd1f3d68a (patch) | |
tree | 3f5c0f177454acbb26315abd38946a5835db38d4 /Utilities | |
parent | 18cc1228bb576b16f6a13d7ea4d72d9d90821f9b (diff) | |
download | CMake-ca3a61359541c770fb9ca0ccab83b49fd1f3d68a.zip CMake-ca3a61359541c770fb9ca0ccab83b49fd1f3d68a.tar.gz CMake-ca3a61359541c770fb9ca0ccab83b49fd1f3d68a.tar.bz2 |
STYLE: use GET_TARGET_PROPERTY(LOCATION) instead of manually building the
path to the executables (tested with cmake 2.2.3)
Alex
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/CMakeLists.txt | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 5eea4ce..06160da 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -1,19 +1,12 @@ SUBDIRS(Doxygen KWStyle) -SET(CMD_DIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) -IF(WIN32) - SET(CMD_EXT ".exe") -ELSE(WIN32) - SET(CMD_EXT "") -ENDIF(WIN32) - MAKE_DIRECTORY(${CMake_BINARY_DIR}/Docs) # Add a documentation target. SET(DOC_FILES "") # Generate documentation for "cmake" executable. -SET(CMD ${CMD_DIR}/cmake${CMD_EXT}) +GET_TARGET_PROPERTY(CMD cmake LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${CMake_BINARY_DIR}/Docs/cmake.txt COMMAND ${CMD} @@ -33,7 +26,7 @@ INSTALL_FILES(${CMAKE_DOC_DIR} FILES SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt) # Generate documentation for "ctest" executable. -SET(CMD ${CMD_DIR}/ctest${CMD_EXT}) +GET_TARGET_PROPERTY(CMD ctest LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${CMake_BINARY_DIR}/Docs/ctest.txt COMMAND ${CMD} @@ -52,7 +45,7 @@ SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/ctest.txt) # Generate documentation for "ccmake" executable. IF(BUILD_CursesDialog) - SET(CMD ${CMD_DIR}/ccmake${CMD_EXT}) + GET_TARGET_PROPERTY(CMD ccmake LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${CMake_BINARY_DIR}/Docs/ccmake.txt COMMAND ${CMD} @@ -73,7 +66,7 @@ IF(BUILD_CursesDialog) ENDIF(BUILD_CursesDialog) IF(BUILD_MFCDialog) - SET(CMD ${CMD_DIR}/CMakeSetup${CMD_EXT}) + GET_TARGET_PROPERTY(CMD CMakeSetup LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${CMake_BINARY_DIR}/Docs/CMakeSetup.txt COMMAND ${CMD} @@ -94,6 +87,6 @@ IF(BUILD_MFCDialog) ENDIF(BUILD_MFCDialog) # Drive documentation generation. -ADD_CUSTOM_TARGET(documentation ALL - DEPENDS ${DOC_FILES} +ADD_CUSTOM_TARGET(documentation ALL + DEPENDS ${DOC_FILES} ) |