Skip to content

Commit

Permalink
Merge branch 'make'
Browse files Browse the repository at this point in the history
  • Loading branch information
uwerat committed Jan 6, 2024
2 parents e63b064 + 04afd5e commit 43c06b3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cmake/QskFindMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@

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)
# Use QSK_QT_VERSION specified with baseline 5.15
# otherwise fallback to latest known supported Qt version gte 5.15
# set vars for correct alpha descending sort order and direction (ex. Qt6, Qt5)
if ( NOT QSK_QT_VERSION ) # QSK_QT_VERSION=Qt5
set(QSK_QT_VERSION Qt6 Qt5)
set(CMAKE_FIND_PACKAGE_SORT_ORDER NAME)
set(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)
endif()
find_package(QT "5.15" NAMES ${QSK_QT_VERSION} REQUIRED COMPONENTS Quick)

if ( QT_FOUND )

Expand Down

0 comments on commit 43c06b3

Please sign in to comment.