|
@@ -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
|
|
|
// https://gitlab.kitware.com/cmake/cmake/issues/13667
|
|
|
std::vector<std::string> dirs;
|
|
|
- localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false);
|
|
|
+ localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false,
|
|
|
+ appendImplicit);
|
|
|
return cmJoin(dirs, ";");
|
|
|
};
|
|
|
|