Skip adding externally added plugins to the plugin meta-sets

Plugin meta-sets are not visible outside of the module build tree, so
there is no point in adding dependencies for externally added plugins.

Change-Id: Ica5b29b57c032f4fc9b128172aaa806392e9e581
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bbe26a766748c00da5e2241a9c7ec5e714dd76ad)
This commit is contained in:
Alexey Edelev 2021-04-08 15:55:09 +02:00
parent 1cb2bb2a28
commit a36a738a93
2 changed files with 7 additions and 6 deletions

View File

@ -150,11 +150,15 @@ function(qt_internal_add_plugin target)
endif()
endif()
add_dependencies(qt_plugins "${target}")
if(TARGET qt_plugins)
add_dependencies(qt_plugins "${target}")
endif()
if(arg_TYPE STREQUAL "platforms")
add_dependencies(qpa_plugins "${target}")
if(TARGET qpa_plugins)
add_dependencies(qpa_plugins "${target}")
endif()
if(_default_plugin)
if(_default_plugin AND TARGET qpa_default_plugins)
add_dependencies(qpa_default_plugins "${target}")
endif()
endif()

View File

@ -16,9 +16,6 @@ if (NOT CMAKE_PROJECT_NAME STREQUAL "QtBase" AND NOT CMAKE_PROJECT_NAME STREQUAL
Sql
)
qt_prepare_standalone_project()
# needed by qt_internal_add_plugin
add_custom_target(qt_plugins)
else()
qt_internal_upgrade_cmake_policies()
endif()