From d2b52405f5ffa7e11b1a8a1540b173ed23b908e4 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 9 Apr 2021 17:12:39 +0200 Subject: CMake: Fix auto-importing of plugins in static Qt qmake projects Previously the plugin .pri files that CMake generated for qmake consumption contained an '-' to exclude the plugin from auto-importing only if the plugin type was generic or a platform plugin. Now that plugin projects that should be excluded have a proper DEFAULT_IF FALSE clause, we can simply query for the defaultness of the plugin to know whether to exclude it in the generated .pri file. This fixes an issue with Qt static builds and qtvirtualkeyboard. The vkb plugin was not excluded and thus any simple QtGui app linked to the vkb plugin in a static qmake project. This led to linker issues because the vkb plugin also depends on a vkb quick plugin which is not listed as a dependency. Augments 76230d98795a2e7a365328eb693ff57f6ddd7f1d Amends c975c35eaebcca3bd33931fecc3beb513e332292 Fixes: QTBUG-92529 Task-number: QTBUG-87861 Change-Id: I9671f6504374cf0799289bbe19110e01c129402e Reviewed-by: Alexey Edelev Reviewed-by: Alexandru Croitor (cherry picked from commit b6dd5d7c3b6735ef0f50c7eb068727496bff4abf) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPriHelpers.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake index 47be8a6194..5498b8a904 100644 --- a/cmake/QtPriHelpers.cmake +++ b/cmake/QtPriHelpers.cmake @@ -454,7 +454,7 @@ function(qt_generate_plugin_pri_file target pri_file_var) get_target_property(plugin_class_name ${target} QT_PLUGIN_CLASS_NAME) set(plugin_extends "") - if(NOT default_plugin AND (plugin_type STREQUAL "generic" OR plugin_type STREQUAL "platforms")) + if(NOT default_plugin) set(plugin_extends "-") endif() -- cgit v1.2.3