[qt] Force enable moc for Qt6 (#665)

This commit is contained in:
Tadej Novak
2023-01-08 13:32:36 +01:00
committed by GitHub
parent 28e21a2aae
commit 0f568a5f2e

View File

@@ -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