diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-11-30 19:28:00 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-12-08 09:13:03 +0100 |
commit | b3576164f0aedf8d528c3724332a36b0fb6d05e0 (patch) | |
tree | 8dfdbcb6c1468309ce8ab990773806022430096c /cmake/QtPluginHelpers.cmake | |
parent | 9d831491334e75f8ccc691edaeb173af81ab80ac (diff) |
CMake: Disable static plugin imports for non-executable targets
There is no point in generating cpp files containing Q_IMPORT_PLUGIN()
macro calls for non-executable targets like modules, plugins and object
libraries in a static Qt build.
It causes unnecessary compiling of 10+ files for each of those targets.
In a static Qt build, plugin imports should only be done for executables,
tools and applications.
Pick-to: 6.0
Change-Id: Ied90ef2f6d77a61a093d393cfdf94c400284c4f0
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtPluginHelpers.cmake')
-rw-r--r-- | cmake/QtPluginHelpers.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index 5cb2ece4a0..497ccc0e89 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -88,7 +88,7 @@ function(qt_internal_add_plugin target) # Disable linking of plugins against other plugins during static regular and # super builds. The latter causes cyclic dependencies otherwise. - set_target_properties(${target} PROPERTIES QT_DEFAULT_PLUGINS 0) + _qt_internal_disable_static_default_plugins("${target}") set_target_properties("${target}" PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${output_directory}" |