mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Fix build with older ECM versions
QT_MAJOR_VERSION is defined automatically by QtVersionOption (since ECM 5.82) which is included by KDEInstallDirs. For older ECM, if QT_MAJOR_VERSION isn't already set, default to 5. There is similar to what's used in polkit-qt-1 (which doesn't depend/use ECM at all).
This commit is contained in:
@@ -45,6 +45,12 @@ include(CheckIncludeFiles)
|
||||
# Allows passing e.g. -DECM_ENABLE_SANITIZERS='address;undefined' to cmake.
|
||||
include(ECMEnableSanitizers)
|
||||
|
||||
if(ECM_GLOBAL_FIND_VERSION VERSION_LESS "5.82.0")
|
||||
if(NOT QT_MAJOR_VERSION)
|
||||
set(QT_MAJOR_VERSION "5")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(QT_MAJOR_VERSION EQUAL "6")
|
||||
# ECMDeprecationSettings is in ECM since 5.91, this assumes if you're building
|
||||
# with Qt6, you have latest ECM anyway
|
||||
|
||||
Reference in New Issue
Block a user