KF5_MIN_VERSION was being defined *after* being used
This commit is contained in:
parent
e812a31c40
commit
dedb4b1ed2
1 changed files with 10 additions and 6 deletions
|
@ -2,6 +2,16 @@ cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
project(kdeconnect)
|
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)
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
@ -23,25 +33,19 @@ ecm_setup_version(1.3.3
|
||||||
|
|
||||||
if (SAILFISHOS)
|
if (SAILFISHOS)
|
||||||
find_package(PkgConfig)
|
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_REQUIRED_COMPONENTS I18n DBusAddons CoreAddons IconThemes Config)
|
||||||
set(KF5_OPTIONAL_COMPONENTS)
|
set(KF5_OPTIONAL_COMPONENTS)
|
||||||
set(QCA_MIN_VERSION 2.0.0)
|
|
||||||
pkg_search_module(SFOS REQUIRED sailfishapp)
|
pkg_search_module(SFOS REQUIRED sailfishapp)
|
||||||
pkg_check_modules(QCA2 qca2-qt5>=${QCA_MIN_VERSION} REQUIRED)
|
pkg_check_modules(QCA2 qca2-qt5>=${QCA_MIN_VERSION} REQUIRED)
|
||||||
add_definitions(-DSAILFISHOS)
|
add_definitions(-DSAILFISHOS)
|
||||||
include_directories(${QCA2_INCLUDEDIR})
|
include_directories(${QCA2_INCLUDEDIR})
|
||||||
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
|
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
|
||||||
else()
|
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_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Kirigami2)
|
||||||
set(KF5_OPTIONAL_COMPONENTS DocTools)
|
set(KF5_OPTIONAL_COMPONENTS DocTools)
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
set(KF5_OPTIONAL_COMPONENTS ${KF5_OPTIONAL_COMPONENTS} Runner)
|
set(KF5_OPTIONAL_COMPONENTS ${KF5_OPTIONAL_COMPONENTS} Runner)
|
||||||
endif()
|
endif()
|
||||||
set(QCA_MIN_VERSION "2.1.0")
|
|
||||||
find_package(Qca-qt5 ${QCA_MIN_VERSION} REQUIRED)
|
find_package(Qca-qt5 ${QCA_MIN_VERSION} REQUIRED)
|
||||||
if(NOT WIN32 AND NOT APPLE)
|
if(NOT WIN32 AND NOT APPLE)
|
||||||
find_package(KF5PulseAudioQt REQUIRED)
|
find_package(KF5PulseAudioQt REQUIRED)
|
||||||
|
|
Loading…
Reference in a new issue