Fix top-level build with examples enabled
One of our examples depends on QtQuickTest, which has a public dependency to QtTest. So the example does find_package(Qt6 COMPONENTS QuickTest), which will end up calling find_dependency(QtTest). The Qt6Test cmake config files will import the module's feature, which requires the Qt6::Test target to exist. That however was not created because we set the QT_NO_CREATE_TARGETS. So if we set that (which is correct), then we do need to find Qt6::Test at the top-level. Other modules shouldn't need this as they don't create modules that in turn have a public dependency to testlib. Change-Id: Ia82aaa2b2462feec81659c6e532d0a185e6819a6 Done-with: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
b1299f6a83
commit
f6229fea92
|
@ -8,6 +8,6 @@ project(QtDeclarative
|
|||
)
|
||||
|
||||
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Gui Widgets Network
|
||||
OPTIONAL_COMPONENTS Sql Concurrent)
|
||||
OPTIONAL_COMPONENTS Sql Concurrent Test)
|
||||
|
||||
qt_build_repo()
|
||||
|
|
Loading…
Reference in New Issue