diff options
author | Brad King <brad.king@kitware.com> | 2013-08-26 15:50:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-08-26 15:54:07 (GMT) |
commit | df62f64db72b6f00657e9e739e1e117639dea9da (patch) | |
tree | 88a64dd1f0579ab27b18b0911c817c1e556b3259 /Utilities | |
parent | 8da09f6ee1a59cbef6327d2a88ab8ba5f8b29b1a (diff) | |
download | CMake-df62f64db72b6f00657e9e739e1e117639dea9da.zip CMake-df62f64db72b6f00657e9e739e1e117639dea9da.tar.gz CMake-df62f64db72b6f00657e9e739e1e117639dea9da.tar.bz2 |
Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always
relative paths in CMake code, and set defaults accordingly. Use the
install() command instead of install_files() and install_targets().
This is more modern and also avoids stripping of the first character
from user-specified destinations.
While at it, fix the default destinations reported in the bootstrap
help.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Utilities/cmcompress/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Utilities/cmexpat/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Utilities/cmlibarchive/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Utilities/cmzlib/CMakeLists.txt | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 91965e9..bad8d63 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -123,11 +123,12 @@ add_custom_command( MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt ) -install_files(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES}) -install_files(${CMAKE_DOC_DIR} FILES +install(FILES ${MAN_FILES} DESTINATION ${CMAKE_MAN_DIR}/man1) +install(FILES ${TEXT_FILES} ${HTML_FILES} ${DOCBOOK_FILES} + DESTINATION ${CMAKE_DOC_DIR} ) install(FILES cmake.m4 DESTINATION share/aclocal) diff --git a/Utilities/cmcompress/CMakeLists.txt b/Utilities/cmcompress/CMakeLists.txt index 3323dcd..8063573 100644 --- a/Utilities/cmcompress/CMakeLists.txt +++ b/Utilities/cmcompress/CMakeLists.txt @@ -2,4 +2,4 @@ PROJECT(CMCompress) ADD_LIBRARY(cmcompress cmcompress.c) -INSTALL(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}/cmcompress) +INSTALL(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}/cmcompress) diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 320612c..74a713d 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -716,7 +716,7 @@ TARGET_LINK_LIBRARIES(cmcurl ${CURL_LIBS}) IF(CMAKE_BUILD_CURL_SHARED) SET_TARGET_PROPERTIES(cmcurl PROPERTIES DEFINE_SYMBOL BUILDING_LIBCURL RUNTIME_OUTPUT_DIRECTORY ${CMake_BIN_DIR}) - INSTALL_TARGETS(/bin cmcurl) + INSTALL(TARGETS cmcurl RUNTIME DESTINATION bin) ENDIF(CMAKE_BUILD_CURL_SHARED) OPTION(CURL_TESTING "Do libCurl testing" OFF) @@ -731,4 +731,4 @@ IF(CMAKE_CURL_TEST_URL) ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) ENDIF(CMAKE_CURL_TEST_URL) -INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmcurl) +INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmcurl) diff --git a/Utilities/cmexpat/CMakeLists.txt b/Utilities/cmexpat/CMakeLists.txt index b75c112..51ba413 100644 --- a/Utilities/cmexpat/CMakeLists.txt +++ b/Utilities/cmexpat/CMakeLists.txt @@ -31,4 +31,4 @@ CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/expat.h ${CMEXPAT_BINARY_DIR}/expat.h) ADD_LIBRARY(cmexpat ${expat_SRCS}) -INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmexpat) +INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmexpat) diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt index 621888c..8ef0e89 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt @@ -1311,4 +1311,4 @@ ENDIF(APPLE) add_subdirectory(libarchive) -install(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmlibarchive) +install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmlibarchive) diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt index c42a434..f161056 100644 --- a/Utilities/cmzlib/CMakeLists.txt +++ b/Utilities/cmzlib/CMakeLists.txt @@ -40,4 +40,4 @@ ENDFOREACH(name) ADD_LIBRARY(cmzlib ${ZLIB_SRCS}) -INSTALL(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}/cmzlib) +INSTALL(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}/cmzlib) |