fix build

This commit is contained in:
Andrei Yankovich 2021-07-24 13:04:07 +03:00
parent 44e2dd98b0
commit 70256b5cd3

View File

@ -12,11 +12,17 @@ if(TARGET ${PROJECT_NAME})
return()
endif()
set(QT_VERSION_MAJOR 5)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test REQUIRED)
find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED)
include(submodules/QuasarAppLib/CMake/QuasarApp.cmake)
if (NOT ${QT_VERSION_MAJOR} EQUAL 5)
message("The ${PROJECT_NAME} support only qt5. please rebuild this project with qt6")
initAll()
return()
endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test REQUIRED)
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
initAll()