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

5
set(KF5_MIN_VERSION "5.67.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 "${KDEPIM_VERSION_NUMBER}${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.13.40")
set(AKONADI_VERSION "5.13.40")
set(LIBKDEPIM_LIB_VERSION "5.13.40")
set(CALENDARSUPPORT_LIB_VERSION "5.13.40")
set(KCALENDARCORE_LIB_VERSION "5.13.40")
Laurent Montel's avatar
Laurent Montel committed
45
46
47
48

set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
set(KDEPIM_LIB_SOVERSION "5")

49
set(QT_REQUIRED_VERSION "5.12.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
70
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
71
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
72
endif()
Laurent Montel's avatar
Laurent Montel committed
73

74
add_subdirectory(calendarjanitor)
75
add_subdirectory(konsolekalendar)
Laurent Montel's avatar
Laurent Montel committed
76

Laurent Montel's avatar
Laurent Montel committed
77
78
79
80
81
82
83
84
85
if (ECM_VERSION VERSION_LESS "5.68.0")
    install(FILES console.renamecategories console.categories  DESTINATION  ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else ()
    ecm_qt_install_logging_categories(
        EXPORT AKONADICALENDARTOOLS
        FILE console.categories
        DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
        )
endif()
Laurent Montel's avatar
Split    
Laurent Montel committed
86

Laurent Montel's avatar
Laurent Montel committed
87
88
add_subdirectory(doc)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)