diff options
author | Craig Scott <craig.scott@qt.io> | 2021-03-03 23:17:17 +1100 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-03-31 21:40:49 +1100 |
commit | 3d09e9c2f521c638a312378e3c7f137accfe8212 (patch) | |
tree | 9a33804b8f9f8568dff98e2614a4ac83b77eb7b0 /src/qml/Qt6QmlBuildInternals.cmake | |
parent | 661f120c1d9e00aff31c432f84f83f58b8aa9c9a (diff) |
Use CLASS_NAME rather than CLASSNAME for qt6_add_qml_module()
Task-number: QTBUG-88763
Change-Id: I118227ec418ac59eb6603d236b38b1a4319a51c2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 17 |
1 files changed, 11 insertions, 6 deletions
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() |