Commit 76196459 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Improve logic to build the desktop version

Only compile the desktop version when all the components required are
present. Don't use the almost-deprecated backend.
parent a6038992
project(kalgebra)
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 2.8.12)
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH})
find_package(Qt5 5.2 REQUIRED NO_MODULE COMPONENTS Qml Quick Xml Svg Test)
find_package(Qt5 5.2 REQUIRED NO_MODULE COMPONENTS Qml Quick Xml Svg PrintSupport Test)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
......@@ -33,14 +33,10 @@ add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
find_package(KF5I18n ${KF5_VERSION} REQUIRED)
find_package(Qt5PrintSupport REQUIRED)
if(${MOBILE_BACKEND} STREQUAL "kde" AND NOT CMAKE_SYSTEM MATCHES Android*)
find_package(KF5ConfigWidgets ${KF5_VERSION} REQUIRED)
find_package(KF5WidgetsAddons ${KF5_VERSION} REQUIRED)
find_package(KF5KIO REQUIRED)
find_package(Qt5WebEngineWidgets REQUIRED)
find_package(KF5DocTools)
find_package(KF5 ${KF5_VERSION} OPTIONAL_COMPONENTS ConfigWidgets WidgetsAddons KIO DocTools)
find_package(Qt5WebEngineWidgets)
if(KF5DocTools_FOUND AND Qt5WebEngineWidgets_FOUND AND KF5ConfigWidgets_FOUND AND KF5WidgetsAddons_FOUND AND KF5KIO_FOUND AND NOT CMAKE_SYSTEM MATCHES Android*)
add_subdirectory(src)
add_subdirectory(plasmoids)
endif()
......
Markdown is supported
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