summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2007-12-26 21:57:13 (GMT)
committerDavid Cole <david.cole@kitware.com>2007-12-26 21:57:13 (GMT)
commit764f6838a75edd42c4b78dd50c539896790b2229 (patch)
tree112e848b9a9d59d63956fdbdb047df1430f967c4 /Modules/CPack.cmake
parentad788fe4c8915a3ef71e1bdf09d124dace4b78ca (diff)
downloadCMake-764f6838a75edd42c4b78dd50c539896790b2229.zip
CMake-764f6838a75edd42c4b78dd50c539896790b2229.tar.gz
CMake-764f6838a75edd42c4b78dd50c539896790b2229.tar.bz2
ENH: Give Mac installers package relocation capability. Default location is still the same for backwards compatibility, but packages will now be relocatable by default like they are on Windows via the NSIS installer. New CPack variables for controlling this functionality are CPACK_PACKAGE_DEFAULT_LOCATION and CPACK_PACKAGE_RELOCATABLE.
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r--Modules/CPack.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index eb9ba43..b0075ac 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -78,6 +78,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
+cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
+cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")
+
+# always force to exactly "true" or "false" for CPack.Info.plist.in:
+if(CPACK_PACKAGE_RELOCATABLE)
+ set(CPACK_PACKAGE_RELOCATABLE "true")
+else(CPACK_PACKAGE_RELOCATABLE)
+ set(CPACK_PACKAGE_RELOCATABLE "false")
+endif(CPACK_PACKAGE_RELOCATABLE)
macro(cpack_check_file_exists file description)
if(NOT EXISTS "${file}")