diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-01-11 13:17:03 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-01-13 15:09:15 (GMT) |
commit | a7f393dc49e1b5f57d90075e0a9f7709d4a4ce90 (patch) | |
tree | cf4080f78d38a735e1c1579e3e4d9480903dd801 /Source/cmake.cxx | |
parent | cb7af7af44bd9ce5ac11e345b1756ea0770bbc83 (diff) | |
download | CMake-a7f393dc49e1b5f57d90075e0a9f7709d4a4ce90.zip CMake-a7f393dc49e1b5f57d90075e0a9f7709d4a4ce90.tar.gz CMake-a7f393dc49e1b5f57d90075e0a9f7709d4a4ce90.tar.bz2 |
cmake: Future-proof --find-package mode.
Create cmGeneratorTargets before generating generate-time information.
C++ interfaces for querying build information is increasingly only
available at generate time through the cmGeneratorTarget class. Ensure
that the required cmGeneratorTarget instances are created. Use the
cmGlobalGenerator access API to access the relevant cmGeneratorTarget
instead of creating a temporary one on the stack.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 1dd8a66..cf4b9c3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -593,9 +593,10 @@ bool cmake::FindPackage(const std::vector<std::string>& args) std::string linkPath; std::string flags; std::string linkFlags; - cmGeneratorTarget gtgt(tgt); + gg->CreateGeneratorTargets(mf); + cmGeneratorTarget *gtgt = gg->GetGeneratorTarget(tgt); lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags, - >gt); + gtgt); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str() ); |