1
0
Fork 0

Fix the order of default Qt version

It seems both Qt and cmake documentations are incorrect about the order used in NAMES keyword
This commit is contained in:
Ilya Fedin 2022-12-07 02:43:41 +04:00 committed by John Preston
parent 125b9571c5
commit 609e21643b

View file

@ -25,7 +25,10 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
endif()
if (NOT DEFINED QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(QT NAMES Qt6 COMPONENTS Core)
if (NOT QT_FOUND)
find_package(QT NAMES Qt5 COMPONENTS Core REQUIRED)
endif()
endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets Network Svg REQUIRED)