Commit fc9f97df authored by Ahmad Samir's avatar Ahmad Samir
Browse files

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).
parent 28b0d321
Pipeline #184208 passed with stage
in 2 minutes and 19 seconds
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment