From 0f568a5f2ebb5460b5e46b18ca02e87c5a795681 Mon Sep 17 00:00:00 2001 From: Tadej Novak Date: Sun, 8 Jan 2023 13:32:36 +0100 Subject: [PATCH] [qt] Force enable moc for Qt6 (#665) --- platform/qt/qt.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake index 67a8e7af1..9ef06646f 100644 --- a/platform/qt/qt.cmake +++ b/platform/qt/qt.cmake @@ -134,6 +134,9 @@ include(GNUInstallDirs) include(${PROJECT_SOURCE_DIR}/vendor/nunicode.cmake) set_property(TARGET mbgl-core PROPERTY AUTOMOC ON) +if (Qt6_FOUND AND COMMAND qt_enable_autogen_tool) + qt_enable_autogen_tool(mbgl-core "moc" ON) +endif() target_link_libraries( mbgl-core @@ -201,6 +204,9 @@ set_target_properties( SOVERSION ${MBGL_QT_VERSION_COMPATIBILITY} PUBLIC_HEADER "${qmaplibregl_headers}" ) +if (Qt6_FOUND AND COMMAND qt_enable_autogen_tool) + qt_enable_autogen_tool(qmaplibregl "moc" ON) +endif() if (APPLE AND NOT MBGL_QT_STATIC AND NOT MBGL_QT_INSIDE_PLUGIN) set_target_properties( qmaplibregl PROPERTIES