From 3d09e9c2f521c638a312378e3c7f137accfe8212 Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Wed, 3 Mar 2021 23:17:17 +1100 Subject: Use CLASS_NAME rather than CLASSNAME for qt6_add_qml_module() Task-number: QTBUG-88763 Change-Id: I118227ec418ac59eb6603d236b38b1a4319a51c2 Reviewed-by: Fabian Kosmale Reviewed-by: Ulf Hermann --- src/qml/Qt6QmlBuildInternals.cmake | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/qml/Qt6QmlBuildInternals.cmake') diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index 47ed053602..ef2c1c4ac6 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -31,6 +31,12 @@ function(qt_internal_add_qml_module target) internal_multi_args ) + # We don't want to pass CLASS_NAME to qt_internal_add_plugin(), we will + # pass it to qt6_add_qml_module() to handle instead. qt_internal_add_plugin() + # would just ignore it anyway because we set TYPE to qml_plugin, but we have + # to remove it to prevent duplicates in argument parsing. + list(REMOVE_ITEM public_single_args CLASS_NAME) + set(qml_module_option_args GENERATE_QMLTYPES INSTALL_QMLTYPES @@ -43,8 +49,10 @@ function(qt_internal_add_qml_module target) URI TARGET_PATH VERSION - CLASSNAME TYPEINFO + CLASS_NAME + CLASSNAME # TODO: Remove once all other repos have been updated to use + # CLASS_NAME instead. ) set(qml_module_multi_args @@ -123,11 +131,8 @@ function(qt_internal_add_qml_module target) endif() endforeach() - # Pass through single and multi-value args as provided. CLASSNAME is - # special because it can be passed to qt_internal_add_plugin() and - # qt6_add_qml_module(). - foreach(arg IN LISTS qml_module_single_args qml_module_multi_args - ITEMS CLASSNAME) + # Pass through single and multi-value args as provided + foreach(arg IN LISTS qml_module_single_args qml_module_multi_args) if(DEFINED arg_${arg}) list(APPEND add_qml_module_args ${arg} ${arg_${arg}}) endif() -- cgit v1.2.3