diff options
Diffstat (limited to 'cmake/QtPlugins.cmake.in')
-rw-r--r-- | cmake/QtPlugins.cmake.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in index 3e554a43ad..4859691c46 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 "$<TARGET_PROPERTY:TYPE>") + set(no_static_genex "$<NOT:$<STREQUAL:${type_genex},STATIC_LIBRARY>>") + # Complete condition that defines whether a static plugin is linked string(CONCAT _plugin_condition "$<BOOL:$<AND:" "${_is_plugin_marker_genex}," + "${no_static_genex}," "$<OR:" "${_plugin_is_whitelisted}," "${_plugin_versionless_is_whitelisted}," |