cmake build: Fix building external plugins with Qt6

When finding a Qt component, make sure to explicitly mention the
implicit dependencies too.

This is a workaround for a defect in FindQt5.cmake, which only creates
alias targets and sets the IMPORTED_GLOBAL property on components that
are explicitly listed in the find_package/find_dependency call.

Change-Id: I98c4090ece1fa5704c3a7abeb0e8e27475a30757
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2020-12-23 16:03:03 +01:00
parent a04f5ce3ea
commit 03cc67abd1

View File

@@ -41,7 +41,7 @@ list(APPEND CMAKE_MODULE_PATH \${CMAKE_CURRENT_LIST_DIR})
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
find_dependency(Qt5 ${IDE_QT_VERSION_MIN} find_dependency(Qt5 ${IDE_QT_VERSION_MIN}
COMPONENTS Concurrent Core Network PrintSupport Qml Quick QuickWidgets Sql REQUIRED COMPONENTS Concurrent Core Gui Widgets Core5Compat Network PrintSupport Qml Quick QuickWidgets Sql REQUIRED
) )
if (NOT IDE_VERSION) if (NOT IDE_VERSION)