CMakeLists.txt 3.04 KB
Newer Older
1
cmake_minimum_required(VERSION 3.0)
2
set(PIM_VERSION "5.6.40")
3
project(kdepim-apps-lib VERSION ${PIM_VERSION})
4

5
set(KF5_VERSION "5.37.0")
6 7 8 9 10 11 12 13 14
option(RUN_UNINSTALL "test run uninstalled apps (experimental)" FALSE)

set(ECM_VERSION ${KF5_VERSION})
# ECM setup
if (RUN_UNINSTALL)
   set(ECM_VERSION "5.38.0")
endif()

find_package(ECM ${ECM_VERSION} CONFIG REQUIRED)
15 16
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
Laurent Montel's avatar
Laurent Montel committed
17 18 19 20
if (POLICY CMP0053)
    cmake_policy(SET CMP0053 NEW)
endif()

21 22 23
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
24
include(CMakePackageConfigHelpers)
25 26 27 28
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
29
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
30 31
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
Laurent Montel's avatar
Laurent Montel committed
32 33
include(ECMCoverageOption)

34

Laurent Montel's avatar
Laurent Montel committed
35
set(KDEPIM_APPS_LIB_VERSION ${PIM_VERSION})
36

37
set(QT_REQUIRED_VERSION "5.8.0")
38

39 40 41 42 43 44
set(AKONADI_VERSION "5.6.40")
set(GRANTLEETHEME_LIB_VERSION "5.6.40")
set(KCONTACTS_LIB_VERSION "5.6.40")
set(AKONADICONTACT_LIB_VERSION "5.6.40")
set(LIBKLEO_LIB_VERSION "5.6.40")
set(PIMCOMMON_LIB_VERSION "5.6.40")
45

Laurent Montel's avatar
Laurent Montel committed
46
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets DBus Gui)
47 48 49 50

find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
51 52
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
53
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
54
find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
55 56 57
find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)

find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
58
find_package(KF5AkonadiContact ${AKONADICONTACT_LIB_VERSION} CONFIG REQUIRED)
59
find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
60 61
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
62
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
63 64

find_package(Grantlee5 "5.1" CONFIG REQUIRED)
65

66
find_package(KF5Prison ${KF5_VERSION})
Laurent Montel's avatar
Laurent Montel committed
67 68 69 70 71 72
set_package_properties(Prison PROPERTIES
    DESCRIPTION "Prison"
    URL "http://projects.kde.org/prison"
    TYPE OPTIONAL
    PURPOSE "Needed to show mobile barcodes of your contacts")

73
if(BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
74
    find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Test)
75 76
   add_definitions(-DBUILD_TESTING)
endif(BUILD_TESTING)
77
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
Laurent Montel's avatar
Laurent Montel committed
78
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
79
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
80
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
81 82 83 84
add_subdirectory(libfollowupreminder)
add_subdirectory(libkdepimdbusinterfaces)
add_subdirectory(libsendlater)
add_subdirectory(kaddressbookgrantlee)
85
add_subdirectory(kaddressbookimportexport)
86 87
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

Laurent Montel's avatar
Laurent Montel committed
88
install( FILES kdepim-apps-lib.renamecategories kdepim-apps-lib.categories DESTINATION ${KDE_INSTALL_CONFDIR} )