summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-16 13:49:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-16 14:03:15 (GMT)
commita098ca0d7ac25455a9a1304ecedb8fd8790c6ca7 (patch)
tree90870822056f3e4562d7b29f1f08220cd8d73de5
parentd9c600c504408c79393b9f5b4e334cecca30e67a (diff)
downloadCMake-a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7.zip
CMake-a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7.tar.gz
CMake-a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7.tar.bz2
cmake: Fix --find-package mode link line output
Refactoring in commit v2.8.10~58^2~2 (Ninja: move -LIBPATH behind -link option, 2012-09-26) added arguments to cmLocalGenerator::GetTargetFlags and updated the call sites. However, in the cmake::FindPackage and cmLocalGenerator::AddBuildTargetRule call sites it added the new arguments in the wrong order. The latter was never used and has been removed. The former remains buggy and prints out compiler flags instead of the link framework/library search paths. Fix its argument order.
-rw-r--r--Source/cmake.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 18a7894..112a5f7 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -595,8 +595,8 @@ 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, frameworkPath, linkPath, flags,
- linkFlags, gtgt, false);
+ lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath,
+ linkPath, gtgt, false);
linkLibs = frameworkPath + linkPath + linkLibs;
printf("%s\n", linkLibs.c_str());