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 /Source | |
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 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Source/CursesDialog/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/cmConfigure.cmake.h.in | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 64fc53f..8412e3e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -394,7 +394,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND) set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) add_executable(cmcldeps cmcldeps.cxx) target_link_libraries(cmcldeps CMakeLib) - install_targets(/bin cmcldeps) + install(TARGETS cmcldeps DESTINATION bin) endif() # create a library used by the command line and the GUI @@ -554,7 +554,7 @@ if(WIN32) if(NOT UNIX) add_executable(cmw9xcom cmw9xcom.cxx) target_link_libraries(cmw9xcom CMakeLib) - install_targets(/bin cmw9xcom) + install(TARGETS cmw9xcom DESTINATION bin) endif() endif() @@ -580,11 +580,9 @@ endif() include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) -install_targets(/bin cmake) -install_targets(/bin ctest) -install_targets(/bin cpack) +install(TARGETS cmake ctest cpack DESTINATION bin) if(APPLE) - install_targets(/bin cmakexbuild) + install(TARGETS cmakexbuild DESTINATION bin) endif() -install_files(${CMAKE_DATA_DIR}/include cmCPluginAPI.h) +install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include) diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt index 96e28b4..5efc2fb 100644 --- a/Source/CursesDialog/CMakeLists.txt +++ b/Source/CursesDialog/CMakeLists.txt @@ -34,4 +34,4 @@ add_executable(ccmake ${CURSES_SRCS} ) target_link_libraries(ccmake CMakeLib) target_link_libraries(ccmake cmForm) -install_targets(/bin ccmake) +install(TARGETS ccmake DESTINATION bin) diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 114afd7..ab53b1d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -19,4 +19,4 @@ #cmakedefine CMAKE_STRICT #define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}" #define CMAKE_BUILD_DIR "${CMake_BINARY_DIR}" -#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@" +#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" |