aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quickcontrols2/gallery/CMakeLists.txt10
-rw-r--r--examples/quickcontrols2/wearable/CMakeLists.txt10
2 files changed, 12 insertions, 8 deletions
diff --git a/examples/quickcontrols2/gallery/CMakeLists.txt b/examples/quickcontrols2/gallery/CMakeLists.txt
index ecb308c7..e960f6cc 100644
--- a/examples/quickcontrols2/gallery/CMakeLists.txt
+++ b/examples/quickcontrols2/gallery/CMakeLists.txt
@@ -32,12 +32,14 @@ target_link_libraries(gallery_controls2 PUBLIC # special case
Qt::Gui
Qt::Quick
Qt::QuickControls2
+)
# special case begin
- # Work around QTBUG-86533
- Qt::QuickTemplates2
+if(UNIX AND NOT APPLE AND CMAKE_CROSSCOMPILING)
+ find_package(Qt6 COMPONENTS QuickTemplates2)
+ # Work around QTBUG-86533
+ target_link_libraries(gallery_controls2 PRIVATE Qt::QuickTemplates2)
+endif()
# special case end
-)
-
# Resources:
set(qmake_immediate_resource_files
diff --git a/examples/quickcontrols2/wearable/CMakeLists.txt b/examples/quickcontrols2/wearable/CMakeLists.txt
index cb5e833c..1b9ad7ff 100644
--- a/examples/quickcontrols2/wearable/CMakeLists.txt
+++ b/examples/quickcontrols2/wearable/CMakeLists.txt
@@ -32,12 +32,14 @@ target_link_libraries(wearable PUBLIC
Qt::Gui
Qt::Quick
Qt::QuickControls2
+)
# special case begin
- # Work around QTBUG-86533
- Qt::QuickTemplates2
+if(UNIX AND NOT APPLE AND CMAKE_CROSSCOMPILING)
+ find_package(Qt6 COMPONENTS QuickTemplates2)
+ # Work around QTBUG-86533
+ target_link_libraries(wearable PRIVATE Qt::QuickTemplates2)
+endif()
# special case end
-)
-
# Resources:
set(wearable_resource_files