diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index bdf682a0c5..6ea1c72bbf 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -729,6 +729,17 @@ bool cmQtAutoGenerators::RunAutogen() // moc file is included anywhere a moc_.cpp file is created and // included in the mocs_compilation.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 mocsIncluded; std::map mocsNotIncluded;