summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt6CoreConfigExtras.cmake.in
diff options
context:
space:
mode:
authorSami Shalayel <sami.shalayel@qt.io>2023-11-27 15:09:59 +0100
committerSami Shalayel <sami.shalayel@qt.io>2023-11-28 19:59:49 +0100
commit26f0eaba5221cd85f6bbb42634c9da4d1ef9bde3 (patch)
treea07aa11f97c048d221bb317e22fae060c7071fee /src/corelib/Qt6CoreConfigExtras.cmake.in
parent4f05ffeb41e02d1958f2d16cacc3bc4e21dd9b5b (diff)
do not override initial AUTOMOC_MACRO_NAMES value
The CMake documentation states that the AUTOMOC_MACRO_NAMES property of a target is initially set to CMAKE_AUTOMOC_MACRO_NAMES, so do not override it in qt_enable_autogen_tool. Instead, append the extra macro names not set by the upstream CMake CMAKE_AUTOMOC_MACRO_NAMES variable. Add a test for this. Change-Id: Ib0ef28e7fc9c5f9559150bbe73ffdeac767adc82 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/Qt6CoreConfigExtras.cmake.in')
-rw-r--r--src/corelib/Qt6CoreConfigExtras.cmake.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in
index 9436ae04cf..e5fea0401c 100644
--- a/src/corelib/Qt6CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt6CoreConfigExtras.cmake.in
@@ -26,7 +26,8 @@ if (NOT QT_NO_CREATE_TARGETS)
set_property(TARGET ${__qt_core_target} PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)
endif()
-list(APPEND CMAKE_AUTOMOC_MACRO_NAMES Q_OBJECT Q_GADGET Q_GADGET_EXPORT Q_NAMESPACE Q_NAMESPACE_EXPORT)
+# note: all the other AUTOMOC_MACRO_NAMES are already set by upstream CMake
+list(APPEND CMAKE_AUTOMOC_MACRO_NAMES Q_GADGET_EXPORT Q_ENUM_NS)
list(REMOVE_DUPLICATES CMAKE_AUTOMOC_MACRO_NAMES)
include("${CMAKE_CURRENT_LIST_DIR}/QtInstallPaths.cmake")