CMakeLists.txt 2.36 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
set(AKONADICALENDAR_LIB_VERSION "5.14.40")
set(AKONADI_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
44

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

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


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

# 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
60
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
61 62

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

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

66

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

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

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

Laurent Montel's avatar
Laurent Montel committed
83 84
add_subdirectory(doc)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)