aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery/CMakeLists.txt')
-rw-r--r--examples/quickcontrols2/gallery/CMakeLists.txt10
1 files changed, 6 insertions, 4 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