summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c8cf465..fc35414 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -12,6 +12,7 @@
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmGlobalGeneratorFactory.h"
+#include "cmLinkLineComputer.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmMessenger.h"
@@ -568,7 +569,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
cmSystemTools::ExpandListArgument(libs, libList);
for (std::vector<std::string>::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");
@@ -582,8 +583,10 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
gg->CreateGenerationObjects();
cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName());
cmLocalGenerator* lg = gtgt->GetLocalGenerator();
- lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath,
- linkPath, gtgt, false);
+ cmLinkLineComputer linkLineComputer(lg,
+ lg->GetStateSnapshot().GetDirectory());
+ lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags,
+ linkFlags, frameworkPath, linkPath, gtgt);
linkLibs = frameworkPath + linkPath + linkLibs;
printf("%s\n", linkLibs.c_str());