From 64b78c147fdfa6a9125371c01acfdfce3666c890 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 26 Sep 2015 12:31:52 +0200 Subject: [PATCH] QtAutogen: Move Source initialization to prior loop. Ensure that all targets have their _automoc.cpp before attempting to initialize the autogen target. The initialization evaluates generator expressions for target sources, and must include the _automoc.cpp of object library dependents in order for TARGET_OBJECTS to include the object file for the corresponding _automoc.cpp file. --- Source/cmGlobalGenerator.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6627bcc70..fa9120e34 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1448,6 +1448,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) continue; } + cmQtAutoGenerators::InitializeAutogenSources(&ti->second); targetNames.push_back(ti->second.GetName()); } for(std::vector::iterator ti = targetNames.begin(); @@ -1455,8 +1456,6 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { cmTarget& target = *this->LocalGenerators[i] ->GetMakefile()->FindTarget(*ti, true); - - cmQtAutoGenerators::InitializeAutogenSources(&target); cmQtAutoGenerators::InitializeAutogenTarget( this->LocalGenerators[i], &target); cmQtAutoGenerators autogen;