diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-03-20 20:52:49 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2015-03-20 20:52:49 (GMT) |
commit | 18917d66d4997786afcb27580518e325342117d2 (patch) | |
tree | 9098dda0bc4abb1200b9e264fd6a77075175214a /Modules/CPackRPM.cmake | |
parent | c95e523db87cd503c97ca2a6021614393bb33e0b (diff) | |
download | CMake-18917d66d4997786afcb27580518e325342117d2.zip CMake-18917d66d4997786afcb27580518e325342117d2.tar.gz CMake-18917d66d4997786afcb27580518e325342117d2.tar.bz2 |
CPack/RPM ignore install prefix relocation path
Patch adds possibility to remove
CPACK_PACKAGING_INSTALL_PREFIX from
the list of relocation paths when
crating a relocatable rpm.
Diffstat (limited to 'Modules/CPackRPM.cmake')
-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 |