aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/CMakeLists.txt
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-12-09 17:26:14 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-12-10 10:54:58 +0000
commit885abf6147bf2260dc21d9b8e1752d6f39b315ca (patch)
treee74fdf9c1fcd1eb28a58ab2ba935ab49ffb6b02b /examples/quickcontrols2/gallery/CMakeLists.txt
parente435b7762c19b0f4ebaa0bc3fac5ea2b8026bb88 (diff)
Fix build of some examples on Windows
ba2da7d7459a4c64379336435d6091b30ac0d71e fixed the build of some examples when cross-compiling, but for whatever reason it breaks regular builds on Windows. This patch makes that fix more specific in the environments it affects. Fixes: QTBUG-89290 Pick-to: 6.0 Change-Id: I5356a855e3b6f9c27ba05beb9dc11dc32920c6c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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