From 281eb3d8a6a4983a33d5a8d70a0e21ebb3bd115f Mon Sep 17 00:00:00 2001 From: Brad King <brad.king@kitware.com> Date: Mon, 16 Jun 2014 14:08:43 -0400 Subject: 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. --- Source/cmTarget.cxx | 9 ++++++--- 1 file 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; } //---------------------------------------------------------------------------- -- cgit v0.12