CMakeLists.txt 1.13 KB
Newer Older
1
cmake_minimum_required(VERSION 3.0)
Anupam Basak's avatar
Anupam Basak committed
2
set(PIX_VERSION 1.1.1)
Anupam Basak's avatar
Anupam Basak committed
3
project(pix VERSION ${PIX_VERSION})
4

Nicolas Fella's avatar
Nicolas Fella committed
5 6 7 8 9
set(REQUIRED_QT_VERSION 5.10.0)
set(REQUIRED_KF5_VERSION 5.60)

find_package(ECM ${REQUIRED_KF5_VERSION} REQUIRED NO_MODULE)

10
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH})
11
set(CMAKE_CXX_STANDARD 17)
12

Nicolas Fella's avatar
Nicolas Fella committed
13 14
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Qml Quick Sql Svg QuickControls2 Widgets)
find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS I18n Notifications Config KIO Attica)
15
find_package(MauiKit REQUIRED)
Nicolas Fella's avatar
Nicolas Fella committed
16

17 18 19 20 21
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(ECMAddAppIcon)
Anupam Basak's avatar
Anupam Basak committed
22 23 24 25 26 27 28
include(ECMSetupVersion)
include(FeatureSummary)

ecm_setup_version(${PIX_VERSION}
    VARIABLE_PREFIX PIX
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/pix_version.h"
    )
29 30

if (ANDROID)
Nicolas Fella's avatar
Nicolas Fella committed
31
    find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS AndroidExtras)
32 33
endif()

Nicolas Fella's avatar
Nicolas Fella committed
34
add_subdirectory(src)
35 36 37

install(FILES org.kde.pix.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})

Nicolas Fella's avatar
Nicolas Fella committed
38
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)