浏览代码

Autogen: Fix empty uic executable string

In CMake 3.13.0 when a target has ``AUTOUIC`` enabled but doesn't
link against Qt5Widgets, the uic executable string is empty and
an error string "The uic executable \"\" does not exist" is generated.
In CMake 3.12 ``AUTOUIC`` was silently disabled instead.
This patch fixes the regression and restores the behavior of CMake 3.12.

Fixes: #18630
Sebastian Holtermann 7 年之前
父节点
当前提交
b1b5004c1a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmQtAutoGenInitializer.cxx

+ 1 - 1
Source/cmQtAutoGenInitializer.cxx

@@ -1409,7 +1409,7 @@ bool cmQtAutoGenInitializer::GetUicExecutable()
   }
   }
 
 
   // Test uic command
   // Test uic command
-  if (err.empty()) {
+  if (err.empty() && !this->Uic.Executable.empty()) {
     if (cmSystemTools::FileExists(this->Uic.Executable, true)) {
     if (cmSystemTools::FileExists(this->Uic.Executable, true)) {
       std::vector<std::string> command;
       std::vector<std::string> command;
       command.push_back(this->Uic.Executable);
       command.push_back(this->Uic.Executable);