CMake: Fix examples built as external projects

Usage of a private module needs a respective find_package call now.

Task-number: QTBUG-87776
Change-Id: I3a00a241c5e8637d28606c1f45a843b491c0a8bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 483768fb8ed18fe5911d96f990ddbc69858146bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2025-01-27 11:38:09 +01:00 committed by Qt Cherry-pick Bot
parent 83226ed3d0
commit e50ae83c8c
5 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ if(NOT ANDROID)
message(FATAL_ERROR "Example only works on Android")
endif()
find_package(Qt6 REQUIRED COMPONENTS Widgets)
find_package(Qt6 REQUIRED COMPONENTS Widgets CorePrivate)
qt_standard_project_setup()

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
project(JulianGregorianCalendar VERSION 0.1 LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
find_package(Qt6 REQUIRED COMPONENTS CorePrivate Widgets)
qt_standard_project_setup()

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
project(rhiwindow LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Core Gui)
find_package(Qt6 REQUIRED COMPONENTS Core GuiPrivate)
qt_standard_project_setup()

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
project(cuberhiwidget LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core GuiPrivate Widgets)
qt_standard_project_setup()

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
project(simplerhiwidget LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core GuiPrivate Widgets)
qt_standard_project_setup()