diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index d70a5c4aef..9e559f8755 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -682,8 +682,10 @@ endif() # target is a plugin, or ${target}.qmltypes in all other cases # This function is currently in Technical Preview. # It's signature and behavior might change. +# MANUAL_MOC_JSON_FILES specifies a list of json files, generated by manual moc call, +# to extract metatypes. function(qt6_qml_type_registration target) - + cmake_parse_arguments(arg "" "" "MANUAL_MOC_JSON_FILES" ${ARGN}) get_target_property(import_name ${target} QT_QML_MODULE_URI) if (NOT import_name) message(FATAL_ERROR "Target ${target} is not a QML module") @@ -710,6 +712,9 @@ function(qt6_qml_type_registration target) set(meta_types_json_args "INSTALL_DIR" "${qml_install_dir}/lib/metatypes") endif() + if(arg_MANUAL_MOC_JSON_FILES) + list(APPEND meta_types_json_args "MANUAL_MOC_JSON_FILES" ${arg_MANUAL_MOC_JSON_FILES}) + endif() qt6_extract_metatypes(${target} ${meta_types_json_args}) get_target_property(import_version ${target} QT_QML_MODULE_VERSION) |