Commit 168c11f7 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'fix_autorcc_for_qt6'

bb97a377 Autogen: Fallback on internal qrc parser when RCC isn't built yet
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3049
parents 4b3a7398 bb97a377
......@@ -594,7 +594,7 @@ bool cmQtAutoGenInitializer::InitRcc()
if (this->QtVersion.Major == 5 || this->QtVersion.Major == 6) {
if (stdOut.find("--list") != std::string::npos) {
this->Rcc.ListOptions.emplace_back("--list");
} else {
} else if (stdOut.find("-list") != std::string::npos) {
this->Rcc.ListOptions.emplace_back("-list");
}
}
......@@ -1581,6 +1581,10 @@ bool cmQtAutoGenInitializer::GetQtExecutable(GenVarsT& genVars,
print_err(prop + " evaluates to an empty value");
return false;
}
// Check if the provided executable already exists (it's possible for it
// not to exist when building Qt itself).
genVars.ExecutableExists = cmSystemTools::FileExists(genVars.Executable);
return true;
}
}
......@@ -1630,6 +1634,7 @@ bool cmQtAutoGenInitializer::GetQtExecutable(GenVarsT& genVars,
print_err(err);
return false;
}
genVars.ExecutableExists = true;
}
return true;
......@@ -1648,7 +1653,7 @@ bool cmQtAutoGenInitializer::RccListInputs(std::string const& fileName,
error += "\n";
return false;
}
if (!this->Rcc.ListOptions.empty()) {
if (this->Rcc.ExecutableExists && !this->Rcc.ListOptions.empty()) {
// Use rcc for file listing
if (this->Rcc.Executable.empty()) {
error = "rcc executable not available";
......
......@@ -68,6 +68,7 @@ public:
std::string ExecutableTargetName;
cmGeneratorTarget* ExecutableTarget = nullptr;
std::string Executable;
bool ExecutableExists = false;
/// @brief Constructor
GenVarsT(GenT gen, std::string const& genName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment