summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-23 13:18:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-03-23 13:18:36 (GMT)
commit45583e52728584385f67e68aac0998368042f23f (patch)
tree98badab2d8fcb5233eb293c1ecdbaa7ba8cf93df /Modules
parentd0af0207131b8436a2cf670265f815db511f441d (diff)
parent18917d66d4997786afcb27580518e325342117d2 (diff)
downloadCMake-45583e52728584385f67e68aac0998368042f23f.zip
CMake-45583e52728584385f67e68aac0998368042f23f.tar.gz
CMake-45583e52728584385f67e68aac0998368042f23f.tar.bz2
Merge topic 'cpack-rpm-ignore-default-prefix'
18917d66 CPack/RPM ignore install prefix relocation path
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackRPM.cmake21
1 files changed, 19 insertions, 2 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 539a0aa..162eba7 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -408,6 +408,16 @@
#
# May be used to set per component CPACK_PACKAGING_INSTALL_PREFIX for
# relocatable RPM packages.
+#
+# .. variable:: CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION
+# CPACK_RPM_NO_<COMPONENT>_INSTALL_PREFIX_RELOCATION
+#
+# * Mandatory : NO
+# * Default : CPACK_PACKAGING_INSTALL_PREFIX or CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
+# are treated as one of relocation paths
+#
+# May be used to remove CPACK_PACKAGING_INSTALL_PREFIX and CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
+# from relocatable RPM prefix paths.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
@@ -437,8 +447,15 @@ function(cpack_rpm_prepare_relocation_paths)
# set base path prefix
if(EXISTS "${WDIR}/${PATH_PREFIX}")
- set(TMP_RPM_PREFIXES "${TMP_RPM_PREFIXES}Prefix: ${PATH_PREFIX}\n")
- list(APPEND RPM_USED_PACKAGE_PREFIXES "${PATH_PREFIX}")
+ if(NOT CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION AND
+ NOT CPACK_RPM_NO_${CPACK_RPM_PACKAGE_COMPONENT}_INSTALL_PREFIX_RELOCATION)
+ set(TMP_RPM_PREFIXES "${TMP_RPM_PREFIXES}Prefix: ${PATH_PREFIX}\n")
+ list(APPEND RPM_USED_PACKAGE_PREFIXES "${PATH_PREFIX}")
+
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: removing '${PATH_PREFIX}' from relocation paths")
+ endif()
+ endif()
endif()
# set other path prefixes