summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-09 18:08:15 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-09 18:21:54 (GMT)
commit53e89b6ab0cae7b9ba0316b3806abd986794a22c (patch)
tree45529a1a882e354379d151e88132be00a7286c99 /Source/cmComputeLinkInformation.cxx
parentb69e061b8073efbd2c356f4508ea401c85e8dae3 (diff)
downloadCMake-53e89b6ab0cae7b9ba0316b3806abd986794a22c.zip
CMake-53e89b6ab0cae7b9ba0316b3806abd986794a22c.tar.gz
CMake-53e89b6ab0cae7b9ba0316b3806abd986794a22c.tar.bz2
Add options for separate compile and link sysroots
Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as operation-specific alternatives to `CMAKE_SYSROOT`. This will be useful for Android NDKs that compile and link with different sysroot values (e.g. `r14` with unified headers). Co-Author: Florent Castelli <florent.castelli@gmail.com>
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index b273443..c2ada43 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1737,7 +1737,13 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
}
}
if (use_build_rpath || use_link_rpath) {
- std::string rootPath = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT");
+ std::string rootPath;
+ if (const char* sysrootLink =
+ this->Makefile->GetDefinition("CMAKE_SYSROOT_LINK")) {
+ rootPath = sysrootLink;
+ } else {
+ rootPath = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT");
+ }
const char* stagePath =
this->Makefile->GetDefinition("CMAKE_STAGING_PREFIX");
const char* installPrefix =