path: root/src/corelib/
diff options
authorDavid Faure <>2019-09-27 03:14:45 +0200
committerDavid Faure <>2019-10-04 15:03:53 +0200
commit91a869671eaf16bb8502141f1eb00a38312aa3d5 (patch)
tree5c8d119e9c83ec10f2acc31c668fcb052749235b /src/corelib/
parentbb65ac80977c277b6cba1abee423ccfd5f1b1f4b (diff)
CMake: generate moc files for headers using Q_NAMESPACE_EXPORT too
Commit f66c1db16c050c introduced Q_NAMESPACE_EXPORT and cmake automoc needs to be told to trigger moc creation for headers using that. The default value for this variable, from cmake's Modules/CMakeGenericSystem.cmake is set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE") But it makes more sense to set this here than in upstream cmake, anyway, given that changes to this list happen here in qtbase. Change-Id: I07c85fd0bb5e03e98df7687a8663e28620e1fdb6 Reviewed-by: Simon Hausmann <>
Diffstat (limited to 'src/corelib/')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/ b/src/corelib/
index e0652fdcf9..659faac6a5 100644
--- a/src/corelib/
+++ b/src/corelib/
@@ -46,6 +46,8 @@ if (NOT TARGET Qt5::rcc)
set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)