CMakeLists.txt 1.96 KB
Newer Older
1
#minimum requirements
2
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
3
4

# KDE Application Version, managed by release script
5
set(RELEASE_SERVICE_VERSION_MAJOR "21")
6
set(RELEASE_SERVICE_VERSION_MINOR "07")
7
8
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
9

10
project(klettres VERSION ${RELEASE_SERVICE_VERSION})
11

12
13
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.83.0")
Laurent Montel's avatar
Laurent Montel committed
14

15
16

# we need some parts of the ECM CMake helpers
Laurent Montel's avatar
Laurent Montel committed
17
find_package (ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
18
19
20
21
22
23
set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(ECMOptionalAddSubdirectory)
include(CMakePackageConfigHelpers)
include(ECMInstallIcons)

include(KDEInstallDirs)
24
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
25
26
include(KDECMakeSettings)
include(ECMAddTests)
27
include(ECMAddAppIcon)
28
include(ECMQtDeclareLoggingCategory)
29
include(ECMSetupVersion)
30
31
32
33
34
35

# Load the frameworks we need

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
  Core
  Svg
36
  Network
37
38
39
  Test
  Widgets
)
Antonio Rojas's avatar
Antonio Rojas committed
40
find_package(Phonon4Qt5 REQUIRED)
41

Laurent Montel's avatar
Laurent Montel committed
42
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
43
  Crash
44
45
46
47
48
49
50
51
  DocTools
  I18n
  NewStuff
  WidgetsAddons
  ConfigWidgets
  CoreAddons
)

52
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${PHONON_INCLUDE_DIR})
53

54

55
56
57
58
59
60
61
62
ecm_optional_add_subdirectory( doc )
ecm_optional_add_subdirectory( src )
ecm_optional_add_subdirectory( pics )
ecm_optional_add_subdirectory( data )
ecm_optional_add_subdirectory( sounds )
ecm_optional_add_subdirectory( icons )
ecm_optional_add_subdirectory( themes )
ecm_optional_add_subdirectory( tests )
63

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
64
ki18n_install(po)
65
66
67
if (KF5DocTools_FOUND)
    kdoctools_install(po)
endif()
68
install(FILES org.kde.klettres.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
69

70

Luca Beltrame's avatar
Luca Beltrame committed
71
ecm_qt_install_logging_categories(EXPORT KLETTRES FILE klettres.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
72

Laurent Montel's avatar
Laurent Montel committed
73
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
74
75