Browse Source

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.
Brad King 9 years ago
parent
commit
a098ca0d7a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/cmake.cxx

+ 2 - 2
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());