CMakeLists.txt 1.5 KB
Newer Older
Nicolas Fella's avatar
Nicolas Fella committed
1
cmake_minimum_required(VERSION 3.16)
Marco Martin's avatar
Marco Martin committed
2

Nicolas Fella's avatar
Nicolas Fella committed
3
4
5
6
7
# KDE Release Service Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "21")
set (RELEASE_SERVICE_VERSION_MINOR "03")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
Marco Martin's avatar
Marco Martin committed
8

Nicolas Fella's avatar
Nicolas Fella committed
9
project(kirigami2gallery VERSION ${RELEASE_SERVICE_VERSION})
Marco Martin's avatar
Marco Martin committed
10

Nicolas Fella's avatar
Nicolas Fella committed
11
set(REQUIRED_QT_VERSION "5.15.0")
Nicolas Fella's avatar
Nicolas Fella committed
12
set(KF5_DEP_VERSION "5.79.0")
Marco Martin's avatar
Marco Martin committed
13

Nicolas Fella's avatar
Nicolas Fella committed
14
set(CMAKE_CXX_STANDARD 17)
Marco Martin's avatar
Marco Martin committed
15

Nicolas Fella's avatar
Nicolas Fella committed
16
find_package(ECM ${KF5_DEP_VERSION} REQUIRED)
Marco Martin's avatar
Marco Martin committed
17

Nicolas Fella's avatar
Nicolas Fella committed
18
19
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
Marco Martin's avatar
Marco Martin committed
20
21
22

find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Gui Svg QuickControls2)

Nicolas Fella's avatar
Nicolas Fella committed
23
find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Kirigami2 ItemModels)
Marco Martin's avatar
Marco Martin committed
24

25
26
option(ENABLE_QML_PROFILING "Enable QML profiler support" ON)

Nicolas Fella's avatar
Nicolas Fella committed
27
include(FeatureSummary)
Marco Martin's avatar
Marco Martin committed
28
29
30
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
31
32
include(ECMPoQmTools)
include(ECMQMLModules)
Marco Martin's avatar
Marco Martin committed
33

Nicolas Fella's avatar
Nicolas Fella committed
34
if(ANDROID)
Marco Martin's avatar
Marco Martin committed
35
36
37
38
    find_package(Qt5AndroidExtras ${REQUIRED_QT_VERSION} REQUIRED)
endif()

ecm_find_qmlmodule(QtGraphicalEffects 1.0)
39
ecm_find_qmlmodule(org.kde.kitemmodels 1.0)
Marco Martin's avatar
Marco Martin committed
40
41
42
43
44
45
46
47
48
49
50

add_definitions(-DQT_NO_URL_CAST_FROM_STRING)

add_subdirectory(src)

if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
    ecm_install_po_files_as_qm(po)
endif()

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)