diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-02 19:40:26 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-02 19:40:26 (GMT) |
commit | 4925e64b97b46b7248b7fe7ffa9fb215ca2d460f (patch) | |
tree | 9f5590a4240a1abc5762dcfdcca4faaf544b7d66 /CMakeLists.txt | |
parent | 1feb4a09b078452c42e74a1caeb432f6ccc7da68 (diff) | |
download | CMake-4925e64b97b46b7248b7fe7ffa9fb215ca2d460f.zip CMake-4925e64b97b46b7248b7fe7ffa9fb215ca2d460f.tar.gz CMake-4925e64b97b46b7248b7fe7ffa9fb215ca2d460f.tar.bz2 |
ENH: add support for cygwin source and binary packaging
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bf63601..6bac837 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -388,9 +388,44 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") SET(CPACK_SOURCE_STRIP_FILES "") SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") ENDIF(WIN32 AND NOT UNIX) +# cygwin specific packaging stuff + IF(CYGWIN) + SET(CPACK_PACKAGE_NAME cmake) + # setup the name of the package for cygwin cmake-2.4.3 + SET(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") + # the source has the same name as the binary + SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) + # Create a cygwin version number in case there are changes for cygwin + # that are not reflected upstream in CMake + SET(CPACK_CYGWIN_PATCH_NUMBER 1) + # 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}") + # These files are required by the cmCPackCygwinSourceGenerator and the files + # put into the release tar files. + SET(CPACK_CYGWIN_BUILD_SCRIPT + "${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh") + SET(CPACK_CYGWIN_PATCH_FILE + "${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch") + # include the sub directory for cygwin releases + SUBDIRS(Utilities/Release/Cygwin) + # when packaging source make sure the .build directory is not included + SET(CPACK_SOURCE_IGNORE_FILES + "/CVS/" "/\\\\.build/" "/\\\\.svn/" "\\\\.swp$" "\\\\.#" "/#" "~$") + ENDIF(CYGWIN) + # include CPack model once all variables are set INCLUDE(CPack) ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") +# configure the CTestScript.cmake file into the binary directory CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake" @ONLY IMMEDIATE) |