CMakeLists.txt 3.47 KB
Newer Older
1
cmake_minimum_required(VERSION 3.0)
2
set(PIM_VERSION "5.6.41")
3

4
project(libkdepim VERSION ${PIM_VERSION})
5

6
set(KF5_VERSION "5.37.0")
Laurent Montel's avatar
Laurent Montel committed
7
8
9
10
11
12
13
14
15
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)
16
17
18
19
20
21
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
Laurent Montel's avatar
Laurent Montel committed
22
include(CMakePackageConfigHelpers)
23
24
25
26
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
27
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
28
29
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
Laurent Montel's avatar
Laurent Montel committed
30
31
include(ECMCoverageOption)

32

Laurent Montel's avatar
Laurent Montel committed
33
set(LIBKDEPIM_LIB_VERSION ${PIM_VERSION})
34
set(AKONADICONTACT_LIB_VERSION "5.6.40")
35
set(QT_REQUIRED_VERSION "5.8.0")
36
37
38
39
set(KLDAP_LIB_VERSION "5.6.40")
set(KCONTACTS_LIB_VERSION "5.6.40")
set(AKONADISEARCH_LIB_VERSION "5.6.40")
set(AKONADI_VERSION "5.6.40")
40

41
42
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test DBus Network)

43
44
find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
45
46
47
48
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
49
50
find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
51
52
53
54
55
56
57
find_package(KF5JobWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
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
60
find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
61

Laurent Montel's avatar
Laurent Montel committed
62
find_package(KF5AkonadiSearch ${AKONADISEARCH_LIB_VERSION} CONFIG REQUIRED)
63
64
set_package_properties(KF5AkonadiSearch PROPERTIES DESCRIPTION "The Akonadi Search libraries" URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Provides search capabilities in KMail and Akonadi")

Heiko Becker's avatar
Heiko Becker committed
65
66
67
68
69
find_package(Qt5Designer CONFIG)
set_package_properties(Qt5Designer PROPERTIES
   PURPOSE "Required to build the Qt Designer plugins"
   TYPE OPTIONAL
)
70

71
72
73
if (Qt5Designer_FOUND)
  find_package(KF5DesignerPlugin ${KF5_VERSION} CONFIG REQUIRED)
endif()
74
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
75
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
76
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
77
78
79
80
81

########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Libkdepim")


Laurent Montel's avatar
Laurent Montel committed
82
configure_package_config_file(MailTransportDBusServiceConfig.cmake.in
83
84
85
86
87
88
89
90
91
92
93
94
  ${CMAKE_CURRENT_BINARY_DIR}/MailTransportDBusServiceConfig.cmake
  PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR
  INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_PREFIX}/MailTransportDBusService")

install(FILES
  ${CMAKE_CURRENT_BINARY_DIR}/MailTransportDBusServiceConfig.cmake
  DESTINATION "${CMAKECONFIG_INSTALL_PREFIX}/MailTransportDBusService")



add_subdirectory(src)

95
install( FILES libkdepim.categories libkdepim.renamecategories DESTINATION ${KDE_INSTALL_CONFDIR} )
96

Laurent Montel's avatar
Laurent Montel committed
97
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)