diff options
author | Brad King <brad.king@kitware.com> | 2014-12-15 14:52:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-15 16:45:49 (GMT) |
commit | dd089e08b578f20b7dc7d2ce658e3df05e346e35 (patch) | |
tree | 2bae57f141cbff3933ba867a2be0ec98430c27e8 /Help | |
parent | 1b3ab3318dcdabe074da3c95b54f9483d47f95be (diff) | |
download | CMake-dd089e08b578f20b7dc7d2ce658e3df05e346e35.zip CMake-dd089e08b578f20b7dc7d2ce658e3df05e346e35.tar.gz CMake-dd089e08b578f20b7dc7d2ce658e3df05e346e35.tar.bz2 |
install: Allow absolute EXPORT destination with relative targets (#15258)
When install(EXPORT) is given an absolute destination we cannot compute
the install prefix relative to the installed export file location.
Previously we disallowed installation of targets in such exports with a
relative destination, but did not enforce this for target property
values besides the location of the main target file. This could lead to
broken installations when the EXPORT is installed to an absolute path
but usage requirements are specified relative to the install prefix.
Since an EXPORT installed to an absolute destination cannot be relocated
we can just hard-code the value of CMAKE_INSTALL_PREFIX as the base for
relative paths. This will allow absolute install(EXPORT) destinations
to work with relative destinations for targets and usage requirements.
Extend the ExportImport test with a case covering this behavior.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/release/dev/install-EXPORT-absolute-prefix.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Help/release/dev/install-EXPORT-absolute-prefix.rst b/Help/release/dev/install-EXPORT-absolute-prefix.rst new file mode 100644 index 0000000..1b2a01c --- /dev/null +++ b/Help/release/dev/install-EXPORT-absolute-prefix.rst @@ -0,0 +1,9 @@ +install-EXPORT-absolute-prefix +------------------------------ + +* The :command:`install(EXPORT)` command now works with an absolute + ``DESTINATION`` even if targets in the export set are installed + with a destination or usage requirements specified relative to the + install prefix. The value of the :variable:`CMAKE_INSTALL_PREFIX` + variable is hard-coded into the installed export file as the base + for relative references. |