From 703df7191956ba81cf17cb91746a669ba7f1c6e3 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 11 Jun 2021 16:56:59 +0200 Subject: CMake: Don't generate .pri files for qml plugins We didn't do it in Qt 5 times and it was accidentally done for Qt 6. There's no reason to generate them, the .pri files are only meant to be used for regular plugins so a project can do QTPLUGINS += foo. That mechanism is not needed for qml plugins which use qmlimportscanner instead. Furthermore the pri contents didn't contain a class name, so they couldn't be used anyway. Change-Id: I6299fda21ece0f693a817ab558b45aa46b97e5ee Reviewed-by: Joerg Bornemann (cherry picked from commit 103c1bc7baf29dbc93fdffc81586c83225eeef1c) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPluginHelpers.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmake/QtPluginHelpers.cmake') diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index a7d2720ee4..11bfbfea11 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -320,7 +320,11 @@ function(qt_internal_add_plugin target) qt_register_target_dependencies("${target}" "${arg_PUBLIC_LIBRARIES}" "${qt_libs_private}") set(plugin_init_target "") if (NOT BUILD_SHARED_LIBS) - qt_generate_plugin_pri_file("${target}" pri_file) + + # There's no point in generating pri files for qml plugins. We didn't do it in Qt5 times. + if(NOT plugin_type_escaped STREQUAL "qml_plugin") + qt_generate_plugin_pri_file("${target}" pri_file) + endif() if(qt_module_target) __qt_internal_add_static_plugin_init_object_library("${target}" plugin_init_target) -- cgit v1.2.3