From dae1f74d8ac83b31fea500c99573dbd0af6d8907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 20 Dec 2023 08:47:02 +0000 Subject: [PATCH] Revert "Add the explicit CMake dependencies between QML module targets" This reverts commit 8a238c0ab8a8c6ad3851315193c118e859b6da7a, as it caused configure issues in qtcharts, qtquick3d that need to be figured out first. Change-Id: I0544d57f15e0c8613300edacc97c3505a986dc69 Pick-to: 6.7 Fixes: QTBUG-120279 Fixes: QTBUG-120282 Reviewed-by: Fabian Kosmale Reviewed-by: Joerg Bornemann --- src/qml/Qt6QmlMacros.cmake | 41 ++------------------------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index 65059125ae..4b1fd058e9 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -349,7 +349,6 @@ function(qt6_add_qml_module target) ) endif() endif() - set_property(GLOBAL APPEND PROPERTY _qt_all_qml_uris ${arg_URI}) set_property(GLOBAL APPEND PROPERTY _qt_all_qml_output_dirs ${arg_OUTPUT_DIRECTORY}) set_property(GLOBAL APPEND PROPERTY _qt_all_qml_targets ${target}) @@ -429,12 +428,12 @@ function(qt6_add_qml_module target) QT_QML_MODULE_DEPENDENCIES "${dependency}" ) else() - string(SUBSTRING ${dependency} 0 ${slash_position} dep_module_uri) + string(SUBSTRING ${dependency} 0 ${slash_position} dep_module) math(EXPR slash_position "${slash_position} + 1") string(SUBSTRING ${dependency} ${slash_position} -1 dep_version) if (dep_version MATCHES "^([0-9]+(\\.[0-9]+)?|auto)$") set_property(TARGET ${target} APPEND PROPERTY - QT_QML_MODULE_DEPENDENCIES "${dep_module_uri} ${dep_version}" + QT_QML_MODULE_DEPENDENCIES "${dep_module} ${dep_version}" ) else() message(FATAL_ERROR @@ -444,7 +443,6 @@ function(qt6_add_qml_module target) endif() endif() endforeach() - _qt_internal_collect_qml_module_dependencies(${target}) if(arg_AUTO_RESOURCE_PREFIX) if(arg_RESOURCE_PREFIX) @@ -4060,38 +4058,3 @@ function(_qt_internal_add_qml_static_plugin_dependency target dep_target) "$<${skip_prl_marker}:$>") endif() endfunction() - -function(_qt_internal_collect_qml_module_dependencies target) - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19.0") - cmake_language(EVAL CODE - "cmake_language(DEFER CALL _qt_internal_collect_qml_module_dependencies_deferred \"${target}\")" - ) - else() - _qt_internal_collect_qml_module_dependencies_deferred("${target}") - endif() -endfunction() - -function(_qt_internal_collect_qml_module_dependencies_deferred target) - get_target_property(deps ${target} QT_QML_MODULE_DEPENDENCIES) - if(NOT deps) - return() - endif() - foreach(dep IN LISTS deps) - string(REPLACE " " ";" dep "${dep}") - list(GET dep 0 dep_module_uri) - get_property(qml_uris GLOBAL PROPERTY _qt_all_qml_uris) - list(FIND qml_uris "${dep_module_uri}" index) - if(index LESS 0) - continue() - endif() - get_property(qml_targets GLOBAL PROPERTY _qt_all_qml_targets) - list(GET qml_targets ${index} dep_module) - # Make the module target dependent on its non-imported QML dependencies. - if(TARGET "${dep_module}") - get_target_property(is_imported ${dep_module} IMPORTED) - if(NOT is_imported) - add_dependencies(${target} ${dep_module}) - endif() - endif() - endforeach() -endfunction()