From 180afc7321c85f7f36d085b76d1be74c99da2462 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 30 Jan 2024 13:03:06 +0100 Subject: [PATCH] Change the way we detect the need of adding QtPlugins.cmake Currently we assume that only modules that have plugins built in the current build tree need to generate and install the QtPlugins.cmake file. This approach is weak since other Qt modules might still want to provide the plugins of the certain types, even if the module that the plugin type belongs too didn't have plugins initially. The fix unblocks the formally 3rd-party plugin installation and loading chain. Pick-to: 6.2 6.5 6.6 6.7 Fixes: QAA-2266 Change-Id: Ifc616e26a00674371c8e2fe2ca12237d153e5707 Reviewed-by: Alexandru Croitor --- cmake/QtPostProcessHelpers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index 0384ee6d44b..c690ff521fb 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -477,8 +477,8 @@ if (__qt_qml_plugins_config_file_list AND NOT QT_SKIP_AUTO_QML_PLUGIN_INCLUSION) endif()") endif() - get_target_property(qt_plugins "${QT_MODULE}" QT_PLUGINS) - if(qt_plugins OR QT_MODULE_PLUGIN_INCLUDES) + get_target_property(module_plugin_types "${QT_MODULE}" MODULE_PLUGIN_TYPES) + if(module_plugin_types OR QT_MODULE_PLUGIN_INCLUDES) list(APPEND modules_with_plugins "${QT_MODULE}") configure_file( "${QT_CMAKE_DIR}/QtPlugins.cmake.in"