summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-05 09:25:10 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2015-02-05 09:25:10 -0500
commit5c29e8897223928855eb6af4d95b063565f11202 (patch)
treeaed919e3025e9a0fd6afb9421e4b9e6033ba00b6
parentf55a2b2ac208969fea684664c812a368137aac8d (diff)
parentecaee7caca4e3d4528e643736c0620e785e84153 (diff)
downloadcmake-5c29e8897223928855eb6af4d95b063565f11202.tar.gz
Merge topic 'cpack-nsis-win64'
ecaee7ca CPack: Fix NSIS default 64-bit Windows install directory (#14211)
-rw-r--r--Modules/CPack.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 35259c493e..ce1536ef9c 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -352,8 +352,8 @@ if(CPACK_NSIS_MODIFY_PATH)
endif()
set(__cpack_system_name ${CMAKE_SYSTEM_NAME})
-if(${__cpack_system_name} MATCHES Windows)
- if(CMAKE_CL_64)
+if(__cpack_system_name MATCHES "Windows")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(__cpack_system_name win64)
else()
set(__cpack_system_name win32)
@@ -363,7 +363,12 @@ cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
# Root dir: default value should be the string literal "$PROGRAMFILES"
# for backwards compatibility. Projects may set this value to anything.
-set(__cpack_root_default "$PROGRAMFILES")
+# When creating 64 bit binaries we set the default value to "$PROGRAMFILES64"
+if("x${__cpack_system_name}" STREQUAL "xwin64")
+ set(__cpack_root_default "$PROGRAMFILES64")
+else()
+ set(__cpack_root_default "$PROGRAMFILES")
+endif()
cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}")
# <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>