summaryrefslogtreecommitdiffstats
path: root/CMakeCPack.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-12 19:51:56 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-12 20:47:06 (GMT)
commit84af42b989fe919fee65fa0809d053a347d3f000 (patch)
tree60637cf087f50f6230e20504504380c29fdc41a8 /CMakeCPack.cmake
parent76550297b6670a6de24b6b58947234ce3ffb6746 (diff)
downloadCMake-84af42b989fe919fee65fa0809d053a347d3f000.zip
CMake-84af42b989fe919fee65fa0809d053a347d3f000.tar.gz
CMake-84af42b989fe919fee65fa0809d053a347d3f000.tar.bz2
Configure NSIS-packaged CMake version and install destination
Remove the version number from the default package install destination. An unversioned default allows users to upgrade their CMake installations without manually re-generating all their build trees to update the path to CMake. Users can select a versioned directory name on installation if they wish. Also name the package with the full CMake version number so it is clear exactly what version is going to be installed. This is particularly helpful for the nightly binary installers.
Diffstat (limited to 'CMakeCPack.cmake')
-rw-r--r--CMakeCPack.cmake14
1 files changed, 5 insertions, 9 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 2495c44..fb55bfc 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -29,27 +29,23 @@ 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_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${CMake_VERSION}")
- set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}")
- # Make this explicit here, rather than accepting the CPack default value,
- # so we can refer to it:
- set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
-
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)
# - "NSIS package/display name" (text used in the installer GUI)
# - Registry key used to store info about the installation
if(CMAKE_CL_64)
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
- set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)")
- set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)")
+ set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)")
else()
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
- set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
+ set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
endif()
+ set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_NSIS_PACKAGE_NAME}")
if(NOT DEFINED CPACK_SYSTEM_NAME)
# make sure package is not Cygwin-unknown, for Cygwin just