diff options
author | Deniz Bahadir <dbahadir@benocs.com> | 2021-01-19 13:09:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-22 13:33:01 (GMT) |
commit | d586a4ad60f34a14c202a3dd60dbfbf50d69ca7f (patch) | |
tree | 3e6619f6619955b83f501d9412b8e08f34c7635c /Tests/CMakeLists.txt | |
parent | 2740cc458b858bf0dedec718b0f089694f87cbd4 (diff) | |
download | CMake-d586a4ad60f34a14c202a3dd60dbfbf50d69ca7f.zip CMake-d586a4ad60f34a14c202a3dd60dbfbf50d69ca7f.tar.gz CMake-d586a4ad60f34a14c202a3dd60dbfbf50d69ca7f.tar.bz2 |
CPackDeb: dpkg-shlibdeps now supports searching for private shared libs
The new CPack variable `CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS`
can be set to a list of directories. If `CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
or `CPACK_DEBIAN_<component>_PACKAGE_SHLIBDEPS` are set to `ON` these
directories will be searched by `dpkg-shlibdeps` in order to find
private shared library dependencies of the libraries/executables that
shall be packed.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5948911..d28d89f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1153,6 +1153,26 @@ if(BUILD_TESTING) "components-depend1" "components-depend2" "compression") + # Run additional tests if dpkg-shlibdeps is available (and is new enough version) + find_program(SHLIBDEPS_EXECUTABLE NAMES dpkg-shlibdeps) + if(SHLIBDEPS_EXECUTABLE) + # Check version of the dpkg-shlibdeps tool + execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --version + OUTPUT_VARIABLE _TMP_VERSION + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(_TMP_VERSION MATCHES "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)") + set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}") + else() + unset(SHLIBDEPS_EXECUTABLE_VERSION) + endif() + if(NOT SHLIBDEPS_EXECUTABLE_VERSION VERSION_LESS 1.19 OR + (NOT SHLIBDEPS_EXECUTABLE_VERSION VERSION_LESS 1.17 AND NOT CMAKE_BINARY_DIR MATCHES ".*[ ].*")) + list(APPEND DEB_CONFIGURATIONS_TO_TEST "shlibdeps-with-private-lib-failure" + "shlibdeps-with-private-lib-success") + endif() + endif() + set(CPackGen "DEB") set(CPackRun_CPackGen "-DCPackGen=${CPackGen}") |