diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index cfb10415438..b1803246823 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -115,6 +115,12 @@ function(qt_internal_add_plugin target) qt_get_sanitized_plugin_type("${plugin_type}" plugin_type_escaped) + if(NOT TARGET qt_${plugin_type_escaped}_plugins_all) + add_custom_target(qt_${plugin_type_escaped}_plugins_all) + endif() + add_dependencies(qt_${plugin_type_escaped}_plugins_all ${target}) + + set(output_directory_default "${QT_BUILD_DIR}/${INSTALL_PLUGINSDIR}/${plugin_type}") set(install_directory_default "${INSTALL_PLUGINSDIR}/${plugin_type}")