Commit f3451358 authored by Sebastian Holtermann's avatar Sebastian Holtermann
Browse files

Autogen: For Qt5 pass all implicit include directories to moc

For Qt4 it was not possible to pass all compiler implicit include
directories to moc because it couldn't handle some system headers.
For reference see commit 753b905e,
commit d2536579 and

For Qt5's moc the problem does not persist anymore so we can
(and should) pass all implicit include directories to moc.

Fixes #18041
parent 2d6cfe26
......@@ -380,13 +380,15 @@ bool cmQtAutoGenInitializer::InitMoc()
// Moc includes
auto GetIncludeDirs = [this,
localGen](std::string const& cfg) -> std::string {
bool const appendImplicit = (this->QtVersionMajor == "5");
auto GetIncludeDirs =
[this, localGen, appendImplicit](std::string const& cfg) -> std::string {
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see
std::vector<std::string> dirs;
localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false);
localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false,
return cmJoin(dirs, ";");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment