diff options
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 44fac1d..9dc045c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -909,7 +909,7 @@ cmGeneratorTarget::NeedRelinkBeforeInstall(const std::string& config) const // If either a build or install tree rpath is set then the rpath // will likely change between the build tree and install tree and // this target must be relinked. - return this->Target->HaveBuildTreeRPATH(config) + return this->HaveBuildTreeRPATH(config) || this->Target->HaveInstallTreeRPATH(); } @@ -4414,3 +4414,18 @@ cmGeneratorTarget::GetLinkImplementation(const std::string& config) const } return &impl; } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const +{ + if (this->Target->GetPropertyAsBool("SKIP_BUILD_RPATH")) + { + return false; + } + if(cmLinkImplementationLibraries const* impl = + this->Target->GetLinkImplementationLibraries(config)) + { + return !impl->Libraries.empty(); + } + return false; +} |