From 6bfe16922a58bd8852125c520b2549dc5aa65c37 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 16 Sep 2019 17:07:28 +0200 Subject: [PATCH] Teach automoc to run moc when it sees Q_ENUM_NS Needed for qtcoap, otherwise AUTOMOC doesn't run moc on qcoapnamespace.h. Change-Id: I4ca43fcbbc5db6163f9f9f788b920eae86f5b174 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann --- cmake/QtBuild.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 6412df1001..3076d5f3a4 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -858,7 +858,7 @@ function(qt_enable_autogen_tool target tool enable) # that the moc scanner has to look for. Inform the CMake moc scanner about it. if(tool STREQUAL "moc" AND enable) set_target_properties("${target}" PROPERTIES - AUTOMOC_MACRO_NAMES "Q_OBJECT;Q_GADGET;Q_NAMESPACE;Q_NAMESPACE_EXPORT") + AUTOMOC_MACRO_NAMES "Q_OBJECT;Q_GADGET;Q_NAMESPACE;Q_NAMESPACE_EXPORT;Q_ENUM_NS") endif() set_target_properties("${target}"