diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-02-28 10:32:13 +0100 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-03-01 10:51:39 +0000 |
commit | 6d5d74c44ae375db62bb17647805e93b2fe8f55d (patch) | |
tree | 1bd677042642901bbe85a71ec53d47a599e37855 | |
parent | 9c4f79e199578518558a4f1a8df5be7673db10a8 (diff) |
Avoid resetting CMAKE_AUTOMOC_MACRO_NAMES
Instead of overwriting the CMAKE_AUTOMOC_MACRO_NAMES, we try to append
our desired moc names to it, and don't get rid of what's there.
Thanks for Friedrich W. H. Kossebau for filling a descriptive bug report
and offering a solution as well.
Fixes: QTBUG-110497
Change-Id: I582af431151cacfe24085b890ae9dba0a0e53f3f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 38ee9ee8497291c899c2a72e0ed24bfffe9ced4e)
-rw-r--r-- | src/corelib/Qt6CoreConfigExtras.cmake.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in index 8b4d3164cf..4a95625854 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() -set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_GADGET_EXPORT" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT") +list(APPEND CMAKE_AUTOMOC_MACRO_NAMES Q_OBJECT Q_GADGET Q_GADGET_EXPORT Q_NAMESPACE Q_NAMESPACE_EXPORT) +list(REMOVE_DUPLICATES CMAKE_AUTOMOC_MACRO_NAMES) # install layout information, following what qmake -query provides get_filename_component(QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../@QT_INVERSE_CONFIG_INSTALL_DIR@ ABSOLUTE) |