瀏覽代碼

Merge branch 'autogen-create-include-dir' into release-3.9

Merge-request: !1113
Brad King 8 年之前
父節點
當前提交
2610c1a733
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      Source/cmQtAutoGenerators.cxx

+ 11 - 0
Source/cmQtAutoGenerators.cxx

@@ -727,6 +727,17 @@ bool cmQtAutoGenerators::RunAutogen()
   // moc file is included anywhere a moc_<filename>.cpp file is created and
   // included in the mocs_compilation_$<CONFIG>.cpp file.
 
+  // Create AUTOGEN include directory
+  {
+    const std::string incDirAbs = cmSystemTools::CollapseCombinedPath(
+      this->AutogenBuildDir, this->AutogenIncludeDir);
+    if (!cmsys::SystemTools::MakeDirectory(incDirAbs)) {
+      this->LogError("AutoGen: Error: Could not create include directory " +
+                     Quoted(incDirAbs));
+      return false;
+    }
+  }
+
   // key = moc source filepath, value = moc output filepath
   std::map<std::string, std::string> mocsIncluded;
   std::map<std::string, std::string> mocsNotIncluded;