summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index aaf1817..8542206 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -883,6 +883,27 @@ bool cmQtAutoGenInitializer::InitRcc()
}
}
+ // Disable zstd if it is not supported
+ {
+ std::string const qtFeatureZSTD = "QT_FEATURE_zstd";
+ if (this->GenTarget->Target->GetMakefile()->IsDefinitionSet(
+ qtFeatureZSTD)) {
+ const auto zstdDef =
+ this->GenTarget->Target->GetMakefile()->GetSafeDefinition(
+ qtFeatureZSTD);
+ const auto zstdVal = cmValue(zstdDef);
+ if (zstdVal.IsOff()) {
+ auto const& kw = this->GlobalInitializer->kw();
+ auto rccOptions = this->GenTarget->GetSafeProperty(kw.AUTORCC_OPTIONS);
+ std::string const nozstd = "--no-zstd";
+ if (rccOptions.find(nozstd) == std::string::npos) {
+ rccOptions.append(";" + nozstd + ";");
+ }
+ this->GenTarget->Target->SetProperty(kw.AUTORCC_OPTIONS, rccOptions);
+ }
+ }
+ }
+
return true;
}