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 <simon.hausmann@qt.io>
This commit is contained in:
parent
bb65ac8097
commit
91a869671e
@ -46,6 +46,8 @@ if (NOT TARGET Qt5::rcc)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT")
|
||||
|
||||
set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
|
||||
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
|
||||
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user