浏览代码

Also run moc automatically with Qt5.

The method of running moc hasn't changed in Qt5.
Stephen Kelly 14 年之前
父节点
当前提交
c208ab8d5c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/cmQtAutomoc.cxx

+ 2 - 2
Source/cmQtAutomoc.cxx

@@ -51,7 +51,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
   const char* targetName = target->GetName();
   const char* targetName = target->GetName();
   // don't do anything if there is no Qt4:
   // don't do anything if there is no Qt4:
   std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR");
   std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR");
-  if (qtMajorVersion != "4")
+  if (qtMajorVersion != "4" && qtMajorVersion != "5")
     {
     {
     return;
     return;
     }
     }
@@ -170,7 +170,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
 
 
   this->Init();
   this->Init();
 
 
-  if (this->QtMajorVersion == "4")
+  if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
     {
     {
     this->RunAutomocQt4();
     this->RunAutomocQt4();
     }
     }