summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-05 14:03:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-03-05 14:04:06 (GMT)
commit168c11f70e52f9b4f00ef289a95023be3f273d2d (patch)
tree2555364b57a88be3e649824ce9ea2ef7119f9d96
parent4b3a73980011344740f804ddda31cdde35a397b8 (diff)
parentbb97a377dd15819357937b4644baa8848d22a990 (diff)
downloadCMake-168c11f70e52f9b4f00ef289a95023be3f273d2d.zip
CMake-168c11f70e52f9b4f00ef289a95023be3f273d2d.tar.gz
CMake-168c11f70e52f9b4f00ef289a95023be3f273d2d.tar.bz2
Merge topic 'fix_autorcc_for_qt6'
bb97a377dd Autogen: Fallback on internal qrc parser when RCC isn't built yet Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3049
-rw-r--r--Source/cmQtAutoGenInitializer.cxx9
-rw-r--r--Source/cmQtAutoGenInitializer.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 2fb6fdf..ef8fe73 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -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";
diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h
index 700f16b..1f4087f 100644
--- a/Source/cmQtAutoGenInitializer.h
+++ b/Source/cmQtAutoGenInitializer.h
@@ -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,