summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 217865b53f..e7080cd8b7 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -452,8 +452,6 @@ static void SetupAutoTargetUic(cmQtAutoGenDigest const& digest,
cmGeneratorTarget const* target = digest.Target;
cmMakefile* makefile = target->Target->GetMakefile();
- AddDefinitionEscaped(makefile, "_uic_skip", setup.UicSkip);
-
// Uic search paths
{
std::vector<std::string> uicSearchPaths;
@@ -489,21 +487,25 @@ static void SetupAutoTargetUic(cmQtAutoGenDigest const& digest,
}
}
}
- // Uic files options
+ // .ui files skip and options
{
std::vector<std::string> uiFileFiles;
std::vector<std::vector<std::string>> uiFileOptions;
{
std::string const uiExt = "ui";
- const std::vector<cmSourceFile*>& srcFiles = makefile->GetSourceFiles();
- for (cmSourceFile* sf : srcFiles) {
+ for (cmSourceFile* sf : makefile->GetSourceFiles()) {
// sf->GetExtension() is only valid after sf->GetFullPath() ...
std::string const& fPath = sf->GetFullPath();
if (sf->GetExtension() == uiExt) {
+ std::string const absFile = cmSystemTools::GetRealPath(fPath);
+ // Check if the file should be skipped
+ if (sf->GetPropertyAsBool("SKIP_AUTOUIC") ||
+ sf->GetPropertyAsBool("SKIP_AUTOGEN")) {
+ setup.UicSkip.insert(absFile);
+ }
// Check if the files has uic options
std::string const uicOpts = GetSafeProperty(sf, "AUTOUIC_OPTIONS");
if (!uicOpts.empty()) {
- std::string const absFile = cmSystemTools::GetRealPath(fPath);
// Check if file isn't skipped
if (setup.UicSkip.count(absFile) == 0) {
uiFileFiles.push_back(absFile);
@@ -519,6 +521,8 @@ static void SetupAutoTargetUic(cmQtAutoGenDigest const& digest,
AddDefinitionEscaped(makefile, "_qt_uic_options_options", uiFileOptions);
}
+ AddDefinitionEscaped(makefile, "_uic_skip", setup.UicSkip);
+
// Uic executable
{
std::string err;