Skip to content

Commit

Permalink
CMake: Don't generate .pri files for qml plugins
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
alcroito committed Jun 17, 2021
1 parent 15c5f90 commit 103c1bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/QtPluginHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 103c1bc

Please sign in to comment.