diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index becfeba46..f48c0bce2 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -561,6 +561,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) makefile->AddDefinition("_target_qt_version", qtVersion); } + std::vector skipUic; std::map configIncludes; std::map configDefines; std::map configUicOptions; @@ -569,7 +570,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) || target->GetPropertyAsBool("AUTOUIC") || target->GetPropertyAsBool("AUTORCC")) { - this->SetupSourceFiles(target); + this->SetupSourceFiles(target, skipUic); } makefile->AddDefinition("_cpp_files", cmOutputConverter::EscapeForCMake(this->Sources).c_str()); @@ -580,7 +581,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) } if (target->GetPropertyAsBool("AUTOUIC")) { - this->SetupAutoUicTarget(target, configUicOptions); + this->SetupAutoUicTarget(target, skipUic, configUicOptions); } if (target->GetPropertyAsBool("AUTORCC")) { @@ -655,7 +656,8 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) } } -void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) +void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target, + std::vector& skipUic) { cmMakefile* makefile = target->GetMakefile(); @@ -669,7 +671,6 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) gtgt->GetConfigCommonSourceFiles(srcFiles); const char *skipMocSep = ""; - const char *skipUicSep = ""; std::vector newRccFiles; @@ -685,9 +686,7 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) if(cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC"))) { - this->SkipUic += skipUicSep; - this->SkipUic += absFile; - skipUicSep = ";"; + skipUic.push_back(absFile); } std::string ext = sf->GetExtension(); @@ -894,17 +893,16 @@ static void GetUicOpts(cmTarget const* target, const std::string& config, } void cmQtAutoGenerators::SetupAutoUicTarget(cmTarget const* target, + std::vector const& skipUic, std::map &configUicOptions) { cmMakefile *makefile = target->GetMakefile(); std::set skipped; - std::vector skipVec; - cmSystemTools::ExpandListArgument(this->SkipUic, skipVec); - skipped.insert(skipVec.begin(), skipVec.end()); + skipped.insert(skipUic.begin(), skipUic.end()); makefile->AddDefinition("_skip_uic", - cmOutputConverter::EscapeForCMake(this->SkipUic).c_str()); + cmOutputConverter::EscapeForCMake(cmJoin(skipUic, ";")).c_str()); std::vector uiFilesWithOptions = makefile->GetQtUiFilesWithOptions(); diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index 25e045fff..c1dac2bdb 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -33,7 +33,8 @@ public: bool InitializeAutogenTarget(cmLocalGenerator* lg, cmTarget* target); void SetupAutoGenerateTarget(cmTarget const* target); - void SetupSourceFiles(cmTarget const* target); + void SetupSourceFiles(cmTarget const* target, + std::vector& skipUic); private: void SetupAutoMocTarget(cmTarget const* target, @@ -41,6 +42,7 @@ private: std::map &configIncludes, std::map &configDefines); void SetupAutoUicTarget(cmTarget const* target, + const std::vector& skipUic, std::map &configUicOptions); void SetupAutoRccTarget(cmTarget const* target);