mirror of
https://github.com/zealdocs/zeal.git
synced 2024-09-11 14:25:52 +03:00
build(cmake): build against Qt 6 by default
Add ZEAL_USE_QT5 option to force build against Qt 5. Fixes #1647.
This commit is contained in:
parent
4260a45fa4
commit
04c525b3d8
@ -22,13 +22,18 @@ set(PROJECT_COMPANY_NAME "Oleg Shparber")
|
||||
set(PROJECT_COPYRIGHT "© 2013-2024 Oleg Shparber and other contributors")
|
||||
|
||||
# Find available major Qt version. It will be stored in QT_VERSION_MAJOR.
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
if(QT_VERSION_MAJOR EQUAL 6)
|
||||
if(NOT ZEAL_USE_QT5)
|
||||
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
|
||||
set(QT_MINIMUM_VERSION 6.2.0)
|
||||
else()
|
||||
endif()
|
||||
|
||||
if(NOT QT_FOUND)
|
||||
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)
|
||||
set(QT_MINIMUM_VERSION 5.9.5)
|
||||
endif()
|
||||
|
||||
message(NOTICE "Detected Qt version: ${QT_VERSION}")
|
||||
|
||||
# Determine version for dev builds.
|
||||
if(NOT ZEAL_RELEASE_BUILD)
|
||||
message(NOTICE "Building unreleased code. Proceed at your own risk!")
|
||||
|
Loading…
Reference in New Issue
Block a user