CMakeLists.txt 2.46 KB
Newer Older
1
cmake_minimum_required(VERSION 3.5)
2
3
set(PIM_VERSION "5.14.40")
project(akonadi-calendar-tools VERSION ${PIM_VERSION})
Laurent Montel's avatar
Laurent Montel committed
4

5
set(KF5_MIN_VERSION "5.71.0")
Laurent Montel's avatar
Laurent Montel committed
6

7
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
8
9
10
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(ECMInstallIcons)

11

Laurent Montel's avatar
Laurent Montel committed
12
13
include(ECMSetupVersion)
include(ECMAddTests)
14

Laurent Montel's avatar
Laurent Montel committed
15
16
include(GenerateExportHeader)
include(ECMGenerateHeaders)
17

Laurent Montel's avatar
Laurent Montel committed
18
19
20
21
22
23
include(FeatureSummary)
include(CheckFunctionExists)
include(ECMGeneratePriFile)

include(KDEInstallDirs)
include(KDECMakeSettings)
24
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
25
26
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
27

Laurent Montel's avatar
Laurent Montel committed
28
29

# Do NOT add quote
30
set(KDEPIM_DEV_VERSION alpha)
Laurent Montel's avatar
Laurent Montel committed
31
32
33
34

# add an extra space
if(DEFINED KDEPIM_DEV_VERSION)
    set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
35
endif()
Laurent Montel's avatar
Laurent Montel committed
36

37
set(KDEPIM_VERSION "${PIM_VERSION}${KDEPIM_DEV_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
38
39


Laurent Montel's avatar
Laurent Montel committed
40
41
42
43
44
set(AKONADICALENDAR_LIB_VERSION "5.14.40")
set(AKONADI_VERSION "5.14.40")
set(LIBKDEPIM_LIB_VERSION "5.14.40")
set(CALENDARSUPPORT_LIB_VERSION "5.14.40")
set(KCALENDARCORE_LIB_VERSION "5.14.40")
Laurent Montel's avatar
Laurent Montel committed
45

46
set(KDEPIM_LIB_VERSION "${PIM_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
47
48
set(KDEPIM_LIB_SOVERSION "5")

49
set(QT_REQUIRED_VERSION "5.13.0")
Laurent Montel's avatar
Laurent Montel committed
50
51
52
53
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets)


# Find KF5 package
54
find_package(KF5DocTools ${KF5_MIN_VERSION} REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
55
56
57
58
59
60

# Find KdepimLibs Package
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KCALENDARCORE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
61
62
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
63
64

include_directories(${akonadi-calendar-tools_SOURCE_DIR} ${akonadi-calendar-tools_BINARY_DIR})
Laurent Montel's avatar
Laurent Montel committed
65
66
67

configure_file(console-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/console-version.h @ONLY)

68

69
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
70
	add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
71
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054700)
72
endif()
73
74
add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
add_definitions(-DQT_NO_EMIT)
Laurent Montel's avatar
Laurent Montel committed
75

76
add_subdirectory(calendarjanitor)
77
add_subdirectory(konsolekalendar)
Laurent Montel's avatar
Laurent Montel committed
78

79
ecm_qt_install_logging_categories(
Laurent Montel's avatar
Laurent Montel committed
80
81
82
83
        EXPORT AKONADICALENDARTOOLS
        FILE console.categories
        DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
        )
Laurent Montel's avatar
Split    
Laurent Montel committed
84

Laurent Montel's avatar
Laurent Montel committed
85
86
add_subdirectory(doc)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)