diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in index 3e554a43ad0..4859691c462 100644 --- a/cmake/QtPlugins.cmake.in +++ b/cmake/QtPlugins.cmake.in @@ -101,10 +101,17 @@ function(__qt_internal_add_static_plugins_once) ">" ) + # No point in linking the plugin initialization source file into static libraries. The + # initialization symbol will be discarded by the linker when the static lib is linked into an + # executable or shared library, because nothing is referencing the global static symbol. + set(type_genex "$") + set(no_static_genex "$>") + # Complete condition that defines whether a static plugin is linked string(CONCAT _plugin_condition "$