summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPack.Info.plist.in4
-rw-r--r--Modules/CPack.cmake9
2 files changed, 11 insertions, 2 deletions
diff --git a/Modules/CPack.Info.plist.in b/Modules/CPack.Info.plist.in
index 58dabad..da4872b 100644
--- a/Modules/CPack.Info.plist.in
+++ b/Modules/CPack.Info.plist.in
@@ -12,7 +12,7 @@
<key>IFPkgFlagAuthorizationAction</key>
<string>AdminAuthorization</string>
<key>IFPkgFlagDefaultLocation</key>
-<string>/</string>
+<string>@CPACK_PACKAGE_DEFAULT_LOCATION@</string>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
@@ -20,7 +20,7 @@
<key>IFPkgFlagOverwritePermissions</key>
<true/>
<key>IFPkgFlagRelocatable</key>
-<false/>
+<@CPACK_PACKAGE_RELOCATABLE@/>
<key>IFPkgFlagRestartAction</key>
<string>NoRestart</string>
<key>IFPkgFlagRootVolumeOnly</key>
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}")