From 8e7760cf2a3994f99f5892fa51f0a947286bfcbb Mon Sep 17 00:00:00 2001 From: EndrII Date: Fri, 23 Jul 2021 18:52:50 +0300 Subject: [PATCH] fix qt5 build --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b453c0..271e828 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,17 @@ if (ANDROID) set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/Client/android") endif() -find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) +find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED) +include(submodules/QuasarAppLib/CMake/QuasarApp.cmake) + +if (${QT_VERSION_MAJOR} LESS_EQUAL 5) + message("The ${PROJECT_NAME} support only qt6. please rebuild this project with qt6") + initAll() + return() +endif() + find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test REQUIRED) -include(submodules/QuasarAppLib/CMake/QuasarApp.cmake) if (DEFINED TARGET_PLATFORM_TOOLCHAIN) if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")