diff options
author | Brad King <brad.king@kitware.com> | 2016-10-04 13:23:06 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-04 13:23:06 (GMT) |
commit | 834efe12bf6bf8059e545ac496eeb390c08e4220 (patch) | |
tree | 5f0ef95e72390841a071f911f9dd07ec839f7fc9 /Source | |
parent | 05d802a77ef94452e8b89c1bf3412c78f0e86c97 (diff) | |
parent | dc6d8066607435a0d4b6338bc53e0b1ac746bd35 (diff) | |
download | CMake-834efe12bf6bf8059e545ac496eeb390c08e4220.zip CMake-834efe12bf6bf8059e545ac496eeb390c08e4220.tar.gz CMake-834efe12bf6bf8059e545ac496eeb390c08e4220.tar.bz2 |
Merge topic 'add-BUILD_RPATH'
dc6d8066 Add a BUILD_RPATH target property specifying build-tree RPATH entries
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 6 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 3 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index dc8236d..0807ef8 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1710,6 +1710,12 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs, const char* install_rpath = this->Target->GetProperty("INSTALL_RPATH"); cmCLI_ExpandListUnique(install_rpath, runtimeDirs, emitted); } + if (use_build_rpath) { + // Add directories explicitly specified by user + if (const char* build_rpath = this->Target->GetProperty("BUILD_RPATH")) { + cmCLI_ExpandListUnique(build_rpath, runtimeDirs, emitted); + } + } if (use_build_rpath || use_link_rpath) { std::string rootPath = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); const char* stagePath = diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e8d66a2..7eb0ebf 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4965,6 +4965,9 @@ bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const if (this->GetPropertyAsBool("SKIP_BUILD_RPATH")) { return false; } + if (this->GetProperty("BUILD_RPATH")) { + return true; + } if (cmLinkImplementationLibraries const* impl = this->GetLinkImplementationLibraries(config)) { return !impl->Libraries.empty(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 54e0bea..13a4744 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -102,6 +102,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", CM_NULLPTR); + this->SetPropertyDefault("BUILD_RPATH", CM_NULLPTR); this->SetPropertyDefault("INSTALL_NAME_DIR", CM_NULLPTR); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); |