From 6c8dc7f1df6d3492d11ad994a35ee2f0b8a4e60b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 7 Oct 2016 20:13:36 +0200 Subject: cmake: Simplify find-package mode library addition It does not need the cmMakefile version. --- Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 14124f8..dad8717 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -568,7 +568,7 @@ bool cmake::FindPackage(const std::vector& args) cmSystemTools::ExpandListArgument(libs, libList); for (std::vector::const_iterator libIt = libList.begin(); libIt != libList.end(); ++libIt) { - mf->AddLinkLibraryForTarget(targetName, *libIt, GENERAL_LibraryType); + tgt->AddLinkLibrary(*mf, *libIt, GENERAL_LibraryType); } std::string buildType = mf->GetSafeDefinition("CMAKE_BUILD_TYPE"); -- cgit v0.12