QtAutogen: Move condition to prior loop.

This commit is contained in:
Stephen Kelly 2015-09-20 16:52:32 +02:00
parent b7491b1cda
commit 9470b056fc

View File

@ -1429,6 +1429,13 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
{
continue;
}
if((!ti->second.GetPropertyAsBool("AUTOMOC")
&& !ti->second.GetPropertyAsBool("AUTOUIC")
&& !ti->second.GetPropertyAsBool("AUTORCC"))
|| ti->second.IsImported())
{
continue;
}
targetNames.push_back(ti->second.GetName());
}
for(std::vector<std::string>::iterator ti = targetNames.begin();
@ -1436,11 +1443,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
{
cmTarget& target = *this->LocalGenerators[i]
->GetMakefile()->FindTarget(*ti, true);
if((target.GetPropertyAsBool("AUTOMOC")
|| target.GetPropertyAsBool("AUTOUIC")
|| target.GetPropertyAsBool("AUTORCC"))
&& !target.IsImported())
{
if(cmQtAutoGenerators::InitializeAutogenTarget(
this->LocalGenerators[i], &target))
{
@ -1449,7 +1452,6 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
}
}
}
}
#else
(void)autogens;
#endif