1
0
Эх сурвалжийг харах

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.
Brad King 11 жил өмнө
parent
commit
281eb3d8a6
1 өөрчлөгдсөн 6 нэмэгдсэн , 3 устгасан
  1. 6 3
      Source/cmTarget.cxx

+ 6 - 3
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;
 }
 
 //----------------------------------------------------------------------------