diff options
author | Florian Apolloner and John Knottenbelt <john@introversion.co.uk> | 2016-02-19 00:27:36 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2016-02-19 00:27:36 (GMT) |
commit | b8263a2f8d6df42b2a37c2efc2f7a3ac2b1d658a (patch) | |
tree | eb5e402bdb16a671d61127f7e9e22ba17b082e35 /Modules/CPackDeb.cmake | |
parent | 9f40f656660a791804e94a2a2a98ee89d7f9c70b (diff) | |
download | CMake-b8263a2f8d6df42b2a37c2efc2f7a3ac2b1d658a.zip CMake-b8263a2f8d6df42b2a37c2efc2f7a3ac2b1d658a.tar.gz CMake-b8263a2f8d6df42b2a37c2efc2f7a3ac2b1d658a.tar.bz2 |
CPack/Deb Create DEBIAN directory for dpkg-shlibdeps
If CMAKE_INSTALL_RPATH is set and contains $ORIGIN then
dpkg-shlibdeps searches for the DEBIAN directory in order
to resolve $ORIGIN in the rpath to a directory. We need to
create the DEBIAN directory for this to work.
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r-- | Modules/CPackDeb.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 2aaef61..b41d926 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -504,6 +504,9 @@ function(cpack_deb_prepare_package_vars) file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian) file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "") + # Create a DEBIAN directory so that dpkg-shlibdeps can find the package dir when resolving $ORIGIN. + file(MAKE_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}/DEBIAN") + # Add --ignore-missing-info if the tool supports it execute_process(COMMAND env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --help OUTPUT_VARIABLE _TMP_HELP @@ -544,6 +547,9 @@ function(cpack_deb_prepare_package_vars) # Remove blank control file # Might not be safe if package actual contain file or directory named debian file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian") + + # remove temporary directory that was created only for dpkg-shlibdeps execution + file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/DEBIAN") else() if(CPACK_DEBIAN_PACKAGE_DEBUG) message(AUTHOR_WARNING "CPackDeb Debug: Using only user-provided depends because package does not contain executable files that link to shared libraries.") |