From dedb4b1ed216a22eaedb33c114f3a30fea67839d Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Tue, 23 Jul 2019 00:28:02 +0200 Subject: [PATCH] KF5_MIN_VERSION was being defined *after* being used --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a87ad831a..8e0909a0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,16 @@ cmake_minimum_required(VERSION 3.0) project(kdeconnect) +if (SAILFISHOS) + set(KF5_MIN_VERSION "5.31.0") + set(QT_MIN_VERSION "5.6.0") + set(QCA_MIN_VERSION "2.0.0") +else() + set(KF5_MIN_VERSION "5.48.0") + set(QT_MIN_VERSION "5.10.0") + set(QCA_MIN_VERSION "2.1.0") +endif() + find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) @@ -23,25 +33,19 @@ ecm_setup_version(1.3.3 if (SAILFISHOS) find_package(PkgConfig) - set(KF5_MIN_VERSION "5.31.0") - set(QT_MIN_VERSION "5.6.0") set(KF5_REQUIRED_COMPONENTS I18n DBusAddons CoreAddons IconThemes Config) set(KF5_OPTIONAL_COMPONENTS) - set(QCA_MIN_VERSION 2.0.0) pkg_search_module(SFOS REQUIRED sailfishapp) pkg_check_modules(QCA2 qca2-qt5>=${QCA_MIN_VERSION} REQUIRED) add_definitions(-DSAILFISHOS) include_directories(${QCA2_INCLUDEDIR}) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) else() - set(KF5_MIN_VERSION "5.48.0") - set(QT_MIN_VERSION "5.10.0") set(KF5_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Kirigami2) set(KF5_OPTIONAL_COMPONENTS DocTools) if(UNIX AND NOT APPLE) set(KF5_OPTIONAL_COMPONENTS ${KF5_OPTIONAL_COMPONENTS} Runner) endif() - set(QCA_MIN_VERSION "2.1.0") find_package(Qca-qt5 ${QCA_MIN_VERSION} REQUIRED) if(NOT WIN32 AND NOT APPLE) find_package(KF5PulseAudioQt REQUIRED)