diff options
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index ba4c4d8..782c154 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -28,8 +28,10 @@ #include "cmAlgorithms.h" #include "cmCustomCommand.h" #include "cmCustomCommandLines.h" +#include "cmEvaluatedTargetProperty.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpression.h" +#include "cmGeneratorExpressionDAGChecker.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLinkItem.h" @@ -1691,6 +1693,23 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo() info.SetArray("MOC_OPTIONS", this->Moc.Options); info.SetBool("MOC_RELAXED_MODE", this->Moc.RelaxedMode); info.SetBool("MOC_PATH_PREFIX", this->Moc.PathPrefix); + + cmGeneratorExpressionDAGChecker dagChecker( + this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr, nullptr); + EvaluatedTargetPropertyEntries InterfaceAutoMocMacroNamesEntries; + + AddInterfaceEntries(this->GenTarget, this->ConfigDefault, + "INTERFACE_AUTOMOC_MACRO_NAMES", "CXX", &dagChecker, + InterfaceAutoMocMacroNamesEntries, + IncludeRuntimeInterface::Yes); + + for (auto const& entry : InterfaceAutoMocMacroNamesEntries.Entries) { + this->Moc.MacroNames.insert(this->Moc.MacroNames.end(), + entry.Values.begin(), entry.Values.end()); + } + this->Moc.MacroNames.erase(cmRemoveDuplicates(this->Moc.MacroNames), + this->Moc.MacroNames.end()); + info.SetArray("MOC_MACRO_NAMES", this->Moc.MacroNames); info.SetArrayArray( "MOC_DEPEND_FILTERS", this->Moc.DependFilters, |