diff options
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index b273443a36..c2ada43c85 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 = |