summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2021-07-12 20:50:43 (GMT)
committerBrad King <brad.king@kitware.com>2021-07-12 21:10:02 (GMT)
commit68b961d36178027faa16dad22ab1637b67144577 (patch)
tree44d63d9f4400e8a170b3040a1c00f34ea6d98e44
parent3c521b89f1a4d10a55a142d74e4eab02716943a0 (diff)
downloadCMake-68b961d36178027faa16dad22ab1637b67144577.zip
CMake-68b961d36178027faa16dad22ab1637b67144577.tar.gz
CMake-68b961d36178027faa16dad22ab1637b67144577.tar.bz2
CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirs
Fixes: #22411
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 2ceab10..1ef0aff 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -662,10 +662,12 @@ function(cpack_deb_prepare_package_vars)
# add ldconfig call in default postrm and postint
set(CPACK_ADD_LDCONFIG_CALL 0)
+ # all files in CPACK_DEB_SHARED_OBJECT_FILES have dot at the beginning
+ set(_LDCONF_DEFAULTS "./lib" "./usr/lib")
foreach(_FILE IN LISTS CPACK_DEB_SHARED_OBJECT_FILES)
get_filename_component(_DIR ${_FILE} DIRECTORY)
- # all files in CPACK_DEB_SHARED_OBJECT_FILES have dot at the beginning
- if(_DIR STREQUAL "./lib" OR _DIR STREQUAL "./usr/lib")
+ get_filename_component(_PARENT_DIR ${_DIR} DIRECTORY)
+ if(_DIR IN_LIST _LDCONF_DEFAULTS OR _PARENT_DIR IN_LIST _LDCONF_DEFAULTS)
set(CPACK_ADD_LDCONFIG_CALL 1)
endif()
endforeach()