diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake index fe33fb4b554..2ab2a7f1cdf 100644 --- a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake +++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake @@ -4,6 +4,9 @@ # Includes QtSetup and friends for private CMake API. set(QT_INTERNAL_IS_STANDALONE_TEST TRUE) +# Make find_package(Qt6 COMPONENTS Foo) pull in FooPrivate too. +set(QT_FIND_PRIVATE_MODULES TRUE) + # Checks minimum CMake version and upgrades policies. qt_internal_project_setup()