diff options
author | Brad King <brad.king@kitware.com> | 2015-03-23 13:18:36 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-03-23 13:18:36 (GMT) |
commit | 45583e52728584385f67e68aac0998368042f23f (patch) | |
tree | 98badab2d8fcb5233eb293c1ecdbaa7ba8cf93df /Modules | |
parent | d0af0207131b8436a2cf670265f815db511f441d (diff) | |
parent | 18917d66d4997786afcb27580518e325342117d2 (diff) | |
download | CMake-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.cmake | 21 |
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 |