Clean up CMake output from wearable example when building qtdeclarative

Remove the two CMake warnings from the CMake output when building
QtDeclarative. The warnings come from a missing optional dependency for
the wearable example.

Pick-to: 6.7 6.8
Change-Id: Id9bf2ccc4d6db2ea44618b2119c69c89e271a870
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
This commit is contained in:
Ed Cooke 2024-10-03 10:57:44 +02:00
parent 14299fef5e
commit d55134197a
1 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,8 @@ project(wearableexample VERSION 1 LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2 OPTIONAL_COMPONENTS Positioning Location)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2)
find_package(Qt6 QUIET OPTIONAL_COMPONENTS Positioning Location)
qt_standard_project_setup()
@ -32,9 +33,9 @@ if(TARGET Qt6::Positioning)
endif()
if(TARGET Qt6::Location)
target_link_libraries(wearableexample PUBLIC
Qt6::Location
)
target_link_libraries(wearableexample PUBLIC
Qt6::Location
)
endif()
if(UNIX AND NOT APPLE AND CMAKE_CROSSCOMPILING)