From 58c12b85ef5205e5d68cedfab191445512a4bfda Mon Sep 17 00:00:00 2001 From: Alexander Kavon Date: Thu, 21 Dec 2023 23:22:06 -0500 Subject: [PATCH] search for Qt6 then Qt5 --- cmake/QskFindMacros.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/QskFindMacros.cmake b/cmake/QskFindMacros.cmake index 035e9514..40915c6f 100644 --- a/cmake/QskFindMacros.cmake +++ b/cmake/QskFindMacros.cmake @@ -5,12 +5,11 @@ macro(qsk_setup_Qt) - # Often users have several Qt installations on their system and - # need to be able to explicitly the one to be used. Let's see if - # standard cmake features are good enough or if we need to introduce - # something sort of additional option. TODO ... - - find_package(QT "5.15" NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick) + # Define a package QT, attempt Qt6, if not fallback to Qt5 + find_package(QT NAMES Qt6 REQUIRED COMPONENTS Quick) + if (NOT QT_FOUND) + find_package(QT "5.15" NAMES Qt5 REQUIRED COMPONENTS Quick) + endif() if ( QT_FOUND )