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.
This commit is contained in:
Stephen Kelly 2015-09-26 12:31:52 +02:00
parent c3c20d3ce3
commit 64b78c147f
1 changed files with 1 additions and 2 deletions

View File

@ -1448,6 +1448,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
continue; continue;
} }
cmQtAutoGenerators::InitializeAutogenSources(&ti->second);
targetNames.push_back(ti->second.GetName()); targetNames.push_back(ti->second.GetName());
} }
for(std::vector<std::string>::iterator ti = targetNames.begin(); for(std::vector<std::string>::iterator ti = targetNames.begin();
@ -1455,8 +1456,6 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
{ {
cmTarget& target = *this->LocalGenerators[i] cmTarget& target = *this->LocalGenerators[i]
->GetMakefile()->FindTarget(*ti, true); ->GetMakefile()->FindTarget(*ti, true);
cmQtAutoGenerators::InitializeAutogenSources(&target);
cmQtAutoGenerators::InitializeAutogenTarget( cmQtAutoGenerators::InitializeAutogenTarget(
this->LocalGenerators[i], &target); this->LocalGenerators[i], &target);
cmQtAutoGenerators autogen; cmQtAutoGenerators autogen;