diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index c308f4b..71dd897 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1061,9 +1061,12 @@ void cmGlobalGenerator::Generate() this->FinalizeTargetCompileDefinitions(); +#ifdef CMAKE_BUILD_WITH_CMAKE // Iterate through all targets and set up automoc for those which have // the AUTOMOC, AUTOUIC or AUTORCC property set - this->CreateQtAutoGeneratorsTargets(); + AutogensType autogens; + this->CreateQtAutoGeneratorsTargets(autogens); +#endif // For each existing cmLocalGenerator unsigned int i; @@ -1097,6 +1100,14 @@ void cmGlobalGenerator::Generate() // Create per-target generator information. this->CreateGeneratorTargets(); +#ifdef CMAKE_BUILD_WITH_CMAKE + for (AutogensType::iterator it = autogens.begin(); it != autogens.end(); + ++it) + { + it->first.SetupAutoGenerateTarget(it->second); + } +#endif + // Trace the dependencies, after that no custom commands should be added // because their dependencies might not be handled correctly for (i = 0; i < this->LocalGenerators.size(); ++i) @@ -1222,11 +1233,9 @@ bool cmGlobalGenerator::CheckTargets() } //---------------------------------------------------------------------------- -void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() +void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { #ifdef CMAKE_BUILD_WITH_CMAKE - typedef std::vector<std::pair<cmQtAutoGenerators, cmTarget*> > Autogens; - Autogens autogens; for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) { cmTargets& targets = @@ -1247,7 +1256,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() && !target.IsImported()) { cmQtAutoGenerators autogen; - if(autogen.InitializeMocSourceFile(&target)) + if(autogen.InitializeAutogenTarget(&target)) { autogens.push_back(std::make_pair(autogen, &target)); } @@ -1255,11 +1264,8 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } } } - for (Autogens::iterator it = autogens.begin(); it != autogens.end(); - ++it) - { - it->first.SetupAutoGenerateTarget(it->second); - } +#else + (void)autogens; #endif } |