diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-28 17:25:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-28 17:25:33 (GMT) |
commit | dcb5907ed67df2e64d5e3f29fefd40e3a8c8eca3 (patch) | |
tree | 97de9eb186e7957a28f4657c65c584ca318b0a0d /Source/cmTarget.cxx | |
parent | 42c56c824c719a640471a622f710b0b86ee02abc (diff) | |
download | CMake-dcb5907ed67df2e64d5e3f29fefd40e3a8c8eca3.zip CMake-dcb5907ed67df2e64d5e3f29fefd40e3a8c8eca3.tar.gz CMake-dcb5907ed67df2e64d5e3f29fefd40e3a8c8eca3.tar.bz2 |
Fix RPATH information when only a genex is used as a link library.
As of commit 1da75022 (Don't include generator expressions in
old-style link handling., 2012-12-23), such entries are not
included in the LinkLibraries member. Generator expressions in
LinkLibraries are not processed anyway, so port to the new way
of getting link information.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 717cfc8..f38b16e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4253,10 +4253,15 @@ void cmTarget::SetPropertyDefault(const char* property, } //---------------------------------------------------------------------------- -bool cmTarget::HaveBuildTreeRPATH() +bool cmTarget::HaveBuildTreeRPATH(const char *config) { - return (!this->GetPropertyAsBool("SKIP_BUILD_RPATH") && - !this->LinkLibraries.empty()); + if (this->GetPropertyAsBool("SKIP_BUILD_RPATH")) + { + return false; + } + std::vector<std::string> libs; + this->GetDirectLinkLibraries(config, libs, this); + return !libs.empty(); } //---------------------------------------------------------------------------- @@ -4327,7 +4332,7 @@ bool cmTarget::NeedRelinkBeforeInstall(const char* config) // 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->HaveBuildTreeRPATH() || this->HaveInstallTreeRPATH(); + return this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); } //---------------------------------------------------------------------------- |