Fix qt_standard_project_setup for Qt 6.2 and below.

This commit is contained in:
Mentalflow 2023-06-24 21:57:00 +08:00
parent 9a1db0b230
commit ffd8072826
No known key found for this signature in database
GPG Key ID: 5AE68D4401A2EE71

View File

@ -16,7 +16,15 @@ set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
add_definitions(-DVERSION=1,3,6,0)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml)
qt_standard_project_setup()
if(QT_VERSION VERSION_GREATER_EQUAL "6.3")
qt_standard_project_setup()
else()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
endif()
#Cpp
file(GLOB_RECURSE CPP_FILES *.cpp *.h)