diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-06-24 22:30:38 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-06-25 14:55:03 (GMT) |
commit | d29ed8a1148d317a5743c0210a3b97d42d41e0a0 (patch) | |
tree | 02672188d40e2d9055892cff7fbc5a9ff270a9ee /Source/cmComputeLinkInformation.cxx | |
parent | 1009fd18604e7670838ed28798b83312eff1b0f0 (diff) | |
download | CMake-d29ed8a1148d317a5743c0210a3b97d42d41e0a0.zip CMake-d29ed8a1148d317a5743c0210a3b97d42d41e0a0.tar.gz CMake-d29ed8a1148d317a5743c0210a3b97d42d41e0a0.tar.bz2 |
BUILD_RPATH/INSTALL_RPATH: Add generator expression support
Fixes: #19423
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 44d8615..b366ebb 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1695,7 +1695,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs, (for_install || this->Target->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH")); bool use_install_rpath = - (outputRuntime && this->Target->HaveInstallTreeRPATH() && + (outputRuntime && this->Target->HaveInstallTreeRPATH(this->Config) && linking_for_install); bool use_build_rpath = (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) && @@ -1715,15 +1715,17 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs, // Construct the RPATH. std::set<std::string> emitted; if (use_install_rpath) { - const char* install_rpath = this->Target->GetProperty("INSTALL_RPATH"); - cmCLI_ExpandListUnique(install_rpath, runtimeDirs, emitted); + std::string install_rpath; + this->Target->GetInstallRPATH(this->Config, install_rpath); + cmCLI_ExpandListUnique(install_rpath.c_str(), runtimeDirs, emitted); } if (use_build_rpath) { // Add directories explicitly specified by user - if (const char* build_rpath = this->Target->GetProperty("BUILD_RPATH")) { + std::string build_rpath; + if (this->Target->GetBuildRPATH(this->Config, build_rpath)) { // This will not resolve entries to use $ORIGIN, the user is expected to // do that if necessary. - cmCLI_ExpandListUnique(build_rpath, runtimeDirs, emitted); + cmCLI_ExpandListUnique(build_rpath.c_str(), runtimeDirs, emitted); } } if (use_build_rpath || use_link_rpath) { |