diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-06-11 16:56:59 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-06-17 18:56:12 +0200 |
commit | 103c1bc7baf29dbc93fdffc81586c83225eeef1c (patch) | |
tree | a814b8695f3429c46e60246f326932fb34e550f6 /cmake | |
parent | 15c5f905072c28537586a070a5320201edeee316 (diff) |
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.
Pick-to: 6.2
Change-Id: I6299fda21ece0f693a817ab558b45aa46b97e5ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtPluginHelpers.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
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) |