summaryrefslogtreecommitdiffstats
path: root/CMakeCPack.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-09-07 18:20:14 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-09-07 18:20:14 (GMT)
commitde46b1c29833330d0c0f704e1af842a0c51618be (patch)
tree7466be0778c8dc3054e20d3e2c16afe08280bc5d /CMakeCPack.cmake
parent30ad13be942dae768d6c3e8f1ab21e9e9568f966 (diff)
downloadCMake-de46b1c29833330d0c0f704e1af842a0c51618be.zip
CMake-de46b1c29833330d0c0f704e1af842a0c51618be.tar.gz
CMake-de46b1c29833330d0c0f704e1af842a0c51618be.tar.bz2
ENH: for CVS CMake have cpack use the version date in the name of the package
Diffstat (limited to 'CMakeCPack.cmake')
-rw-r--r--CMakeCPack.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index f676349..9e6d831 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -10,10 +10,15 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
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}")
+# if version date is set then use that as the patch
+ IF(CMake_VERSION_DATE)
+ SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_DATE}")
+ ELSE(CMake_VERSION_DATE)
+ SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
+ ENDIF(CMake_VERSION_DATE)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
- "cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
+ "cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
IF(CMake_VERSION_RC)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-RC-${CMake_VERSION_RC}")
@@ -53,7 +58,7 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
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}")
+ "${CPACK_PACKAGE_NAME}-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_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