summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-06-11 16:56:59 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-17 19:13:07 +0000
commit703df7191956ba81cf17cb91746a669ba7f1c6e3 (patch)
tree9c74a58a3311fa8dc1267ece0d5de538d5dcbf68 /cmake
parentb3c4ee46f7b601677178baca94b803b2f7c2c1bb (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. Change-Id: I6299fda21ece0f693a817ab558b45aa46b97e5ee Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 103c1bc7baf29dbc93fdffc81586c83225eeef1c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPluginHelpers.cmake6
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)