diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-20 14:50:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-09-26 17:32:52 (GMT) |
commit | b7491b1cda7096aa914c79a1b2fc7768e90aa951 (patch) | |
tree | c044b6fcc86b19df7f117a8a6a82c5c3b71251b8 /Source/cmGlobalGenerator.cxx | |
parent | e791c85419e81b937f0c1215073b2d09ee6c1555 (diff) | |
download | CMake-b7491b1cda7096aa914c79a1b2fc7768e90aa951.zip CMake-b7491b1cda7096aa914c79a1b2fc7768e90aa951.tar.gz CMake-b7491b1cda7096aa914c79a1b2fc7768e90aa951.tar.bz2 |
QtAutogen: Move condition to prior loop.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 20d86a0..82d8d39 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1421,6 +1421,14 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { continue; } + if(ti->second.GetType() != cmTarget::EXECUTABLE && + ti->second.GetType() != cmTarget::STATIC_LIBRARY && + ti->second.GetType() != cmTarget::SHARED_LIBRARY && + ti->second.GetType() != cmTarget::MODULE_LIBRARY && + ti->second.GetType() != cmTarget::OBJECT_LIBRARY) + { + continue; + } targetNames.push_back(ti->second.GetName()); } for(std::vector<std::string>::iterator ti = targetNames.begin(); @@ -1428,23 +1436,16 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { cmTarget& target = *this->LocalGenerators[i] ->GetMakefile()->FindTarget(*ti, true); - if(target.GetType() == cmTarget::EXECUTABLE || - target.GetType() == cmTarget::STATIC_LIBRARY || - target.GetType() == cmTarget::SHARED_LIBRARY || - target.GetType() == cmTarget::MODULE_LIBRARY || - target.GetType() == cmTarget::OBJECT_LIBRARY) + if((target.GetPropertyAsBool("AUTOMOC") + || target.GetPropertyAsBool("AUTOUIC") + || target.GetPropertyAsBool("AUTORCC")) + && !target.IsImported()) { - if((target.GetPropertyAsBool("AUTOMOC") - || target.GetPropertyAsBool("AUTOUIC") - || target.GetPropertyAsBool("AUTORCC")) - && !target.IsImported()) + if(cmQtAutoGenerators::InitializeAutogenTarget( + this->LocalGenerators[i], &target)) { - if(cmQtAutoGenerators::InitializeAutogenTarget( - this->LocalGenerators[i], &target)) - { - cmQtAutoGenerators autogen; - autogens.push_back(std::make_pair(autogen, &target)); - } + cmQtAutoGenerators autogen; + autogens.push_back(std::make_pair(autogen, &target)); } } } |