mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 02:17:27 +08:00
Autogen/RCC: Only pass --no-zstd to Qt6
In commit 9e87df4d46
(Autogen/RCC: Disable zstd if it is not supported,
2024-02-08, v3.29.0-rc1~5^2) we added this flag, but it doesn't exist
for Qt 5. It was only introduced with qtbase commit `14546d1816a8`,
which first appeared in Qt 6.
Fixes: #27111
Issue: #25664
This commit is contained in:
@@ -920,6 +920,7 @@ bool cmQtAutoGenInitializer::InitRcc()
|
|||||||
|
|
||||||
// Disable zstd if it is not supported
|
// Disable zstd if it is not supported
|
||||||
{
|
{
|
||||||
|
if (this->QtVersion.Major >= 6) {
|
||||||
std::string const qtFeatureZSTD = "QT_FEATURE_zstd";
|
std::string const qtFeatureZSTD = "QT_FEATURE_zstd";
|
||||||
if (this->GenTarget->Target->GetMakefile()->IsDefinitionSet(
|
if (this->GenTarget->Target->GetMakefile()->IsDefinitionSet(
|
||||||
qtFeatureZSTD)) {
|
qtFeatureZSTD)) {
|
||||||
@@ -929,7 +930,8 @@ bool cmQtAutoGenInitializer::InitRcc()
|
|||||||
auto const zstdVal = cmValue(zstdDef);
|
auto const zstdVal = cmValue(zstdDef);
|
||||||
if (zstdVal.IsOff()) {
|
if (zstdVal.IsOff()) {
|
||||||
auto const& kw = this->GlobalInitializer->kw();
|
auto const& kw = this->GlobalInitializer->kw();
|
||||||
auto rccOptions = this->GenTarget->GetSafeProperty(kw.AUTORCC_OPTIONS);
|
auto rccOptions =
|
||||||
|
this->GenTarget->GetSafeProperty(kw.AUTORCC_OPTIONS);
|
||||||
std::string const nozstd = "--no-zstd";
|
std::string const nozstd = "--no-zstd";
|
||||||
if (rccOptions.find(nozstd) == std::string::npos) {
|
if (rccOptions.find(nozstd) == std::string::npos) {
|
||||||
rccOptions.append(";" + nozstd + ";");
|
rccOptions.append(";" + nozstd + ";");
|
||||||
@@ -938,6 +940,7 @@ bool cmQtAutoGenInitializer::InitRcc()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user