summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-19 14:47:44 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-02-19 14:47:44 (GMT)
commit509b1f08ea3ee1d8063efc81fee851ee075b3c97 (patch)
treee853f43c6d471d683d16e294cd9db6899a106c9d
parent39a80a1febde53de8747d2062cf23cf4dad4584a (diff)
parente8daee5bd0b68936b89a26e565b010f3387dc158 (diff)
downloadCMake-509b1f08ea3ee1d8063efc81fee851ee075b3c97.zip
CMake-509b1f08ea3ee1d8063efc81fee851ee075b3c97.tar.gz
CMake-509b1f08ea3ee1d8063efc81fee851ee075b3c97.tar.bz2
Merge topic 'cpack-deb-autodep-ORIGIN-RPATH'
e8daee5b CPack/Deb $ORIGIN handling in rpath b8263a2f CPack/Deb Create DEBIAN directory for dpkg-shlibdeps
-rw-r--r--Help/release/dev/cpack-deb-autodep-ORIGIN-RPATH.rst6
-rw-r--r--Modules/CPackDeb.cmake6
2 files changed, 12 insertions, 0 deletions
diff --git a/Help/release/dev/cpack-deb-autodep-ORIGIN-RPATH.rst b/Help/release/dev/cpack-deb-autodep-ORIGIN-RPATH.rst
new file mode 100644
index 0000000..b0d6196
--- /dev/null
+++ b/Help/release/dev/cpack-deb-autodep-ORIGIN-RPATH.rst
@@ -0,0 +1,6 @@
+cpack-deb-autodep-ORIGIN-RPATH
+--------------------------------
+
+* The "CPackDeb" module learned how to handle ``$ORIGIN``
+ in ``CMAKE_INSTALL_RPATH`` when :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
+ is used for dependency auto detection.
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.")