summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-16 18:08:43 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-23 13:22:08 (GMT)
commit281eb3d8a6a4983a33d5a8d70a0e21ebb3bd115f (patch)
tree2c488918b93a60a99264964921e9888b4e7b1a32 /Source/cmTarget.cxx
parentd912220eaaa92f3e8524c33e1684ebbf84eba521 (diff)
downloadCMake-281eb3d8a6a4983a33d5a8d70a0e21ebb3bd115f.zip
CMake-281eb3d8a6a4983a33d5a8d70a0e21ebb3bd115f.tar.gz
CMake-281eb3d8a6a4983a33d5a8d70a0e21ebb3bd115f.tar.bz2
cmTarget: Improve HaveBuildTreeRPATH implementation
Use GetLinkImplementationLibraries instead of GetDirectLinkLibraries because it tells us whether there will be any libraries to link after evaluating generator expressions. Also GetDirectLinkLibraries will be dropped soon.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7a63db4..f4a0224 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4551,9 +4551,12 @@ bool cmTarget::HaveBuildTreeRPATH(const std::string& config) const
{
return false;
}
- std::vector<std::string> libs;
- this->GetDirectLinkLibraries(config, libs);
- return !libs.empty();
+ if(LinkImplementation const* impl =
+ this->GetLinkImplementationLibraries(config))
+ {
+ return !impl->Libraries.empty();
+ }
+ return false;
}
//----------------------------------------------------------------------------