From 609e21643b837580a2fedb258dde413fad1e199e Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 7 Dec 2022 02:43:41 +0400 Subject: [PATCH] Fix the order of default Qt version It seems both Qt and cmake documentations are incorrect about the order used in NAMES keyword --- external/qt/package.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/external/qt/package.cmake b/external/qt/package.cmake index 2faa580..939475a 100644 --- a/external/qt/package.cmake +++ b/external/qt/package.cmake @@ -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)