diff options
author | Brad King <brad.king@kitware.com> | 2010-06-09 15:34:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-06-09 15:34:38 (GMT) |
commit | 6ba45fa9394e1cdd43f9cd52b3db9214867dbea2 (patch) | |
tree | 792831d6c844fb6d823c6610a0d160c070a33370 | |
parent | 6f9bb934d41912ee0e9beb6a34edecf5667f0fe5 (diff) | |
download | CMake-6ba45fa9394e1cdd43f9cd52b3db9214867dbea2.zip CMake-6ba45fa9394e1cdd43f9cd52b3db9214867dbea2.tar.gz CMake-6ba45fa9394e1cdd43f9cd52b3db9214867dbea2.tar.bz2 |
Fix CMake data and doc paths in Cygwin package
Override CMAKE_DOC_DIR and CMAKE_DATA_DIR cache entries on Cygwin early
enough so the new values are used everywhere. Previously only some of
the uses were overridden. Also set CPACK_PACKAGE_VERSION to the whole
CMake_VERSION so that the Cygwin MANIFEST file goes in the proper path.
-rw-r--r-- | CMakeCPack.cmake | 15 | ||||
-rw-r--r-- | CMakeLists.txt | 11 |
2 files changed, 12 insertions, 14 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index ce88d2f..692befa 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -27,9 +27,7 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") SET(CPACK_PACKAGE_VENDOR "Kitware") SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") - SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}") - SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}") - SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}") + SET(CPACK_PACKAGE_VERSION "${CMake_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}") IF(NOT DEFINED CPACK_SYSTEM_NAME) @@ -68,17 +66,6 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") # cygwin specific packaging stuff IF(CYGWIN) - # if we are on cygwin and have cpack, then force the - # doc, data and man dirs to conform to cygwin style directories - SET(CMAKE_DOC_DIR "/share/doc/${CPACK_PACKAGE_FILE_NAME}") - SET(CMAKE_DATA_DIR "/share/${CPACK_PACKAGE_FILE_NAME}") - SET(CMAKE_MAN_DIR "/share/man") - # let the user know we just forced these values - MESSAGE(STATUS "Setup for Cygwin packaging") - MESSAGE(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}") - MESSAGE(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}") - MESSAGE(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}") - # setup the cygwin package name SET(CPACK_PACKAGE_NAME cmake) # setup the name of the package for cygwin cmake-2.4.3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 69b45a4..5fb7453 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -395,6 +395,17 @@ SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CAC SET(CMAKE_MAN_DIR "/man" CACHE STRING "Install location for man pages (relative to prefix).") MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR) +IF(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") + # Force doc, data and man dirs to conform to cygwin layout. + SET(CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}") + SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}") + SET(CMAKE_MAN_DIR "/share/man") + # let the user know we just forced these values + MESSAGE(STATUS "Setup for Cygwin packaging") + MESSAGE(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}") + MESSAGE(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}") + MESSAGE(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}") +ENDIF() STRING(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}") STRING(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}") |