CMakeLists.txt 5.31 KB
Newer Older
1
project(resources)
2
cmake_minimum_required(VERSION 2.8.12)
3

Laurent Montel's avatar
Laurent Montel committed
4
find_package(ECM 0.0.13 CONFIG REQUIRED)
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
set(CMAKE_MODULE_PATH ${resources_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})

include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)

set(KF5_VERSION "4.98.0")
set(QT_REQUIRED_VERSION "5.2.0")

Laurent Montel's avatar
Laurent Montel committed
20 21 22 23
set(KDEPIM_LIB_VERSION "4.70.0")
set(KDEPIM_LIB_SOVERSION "5")


24 25 26 27 28 29
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Akonadi ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5PimUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Abc ${KF5_VERSION} CONFIG REQUIRED)
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
30
find_package(KF5AkonadiMime ${KF5_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
31 32
find_package(KF5PimIdentities ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5MailTransport ${KF5_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
33
find_package(KF5Mime ${KF5_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
34

35 36 37 38

# Xsltproc
find_package(Xsltproc)
set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libxslt" TYPE REQUIRED PURPOSE "Required to generate D-Bus interfaces for all Akonadi resources.")
39

40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
find_package(AccountsQt 1.11 QUIET CONFIG)
set_package_properties(AccountsQt PROPERTIES DESCRIPTION "Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support AccountsQt in different resources")

find_package(SignOnQt 8.56 QUIET CONFIG)
set_package_properties(SignOnQt PROPERTIES DESCRIPTION "SignOn Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support SignOn in different resources")

# Libkolab
find_package(Libkolab 0.5 QUIET CONFIG)
set_package_properties(Libkolab PROPERTIES DESCRIPTION "libkolab" URL "http://mirror.kolabsys.com/pub/releases" TYPE OPTIONAL PURPOSE "The Kolab Format libraries are required to build the Kolab Groupware Resource")

# Libkolabxml
find_package(Libkolabxml 1.0 QUIET CONFIG)
set_package_properties(Libkolabxml PROPERTIES DESCRIPTION "Kolabxml" URL "http://mirror.kolabsys.com/pub/releases" TYPE OPTIONAL PURPOSE "The Kolab XML Format Schema Definitions Library is required to build the Kolab Groupware Resource")

# Libkgapi2
find_package(LibKGAPI2 1.9.81 QUIET CONFIG)
set_package_properties(LibKGAPI2 PROPERTIES DESCRIPTION "KDE-based library for accessing various Google services" URL "https://projects.kde.org/libkgapi" TYPE OPTIONAL PURPOSE "LibKGAPI is required to build Akonadi resources to access Google Contacts, Calendars and Tasks")

# Libkfbapi
find_package(LibKFbAPI 1.0 QUIET CONFIG)
set_package_properties(LibKFbAPI PROPERTIES DESCRIPTION "A library to access Facebook services" URL "http://projects.kde.org/libkfbapi" TYPE OPTIONAL PURPOSE "LibKFbAPI is required to build Akonadi resources to access Facebook's contacts, events, notes and posts" )

if(LibKGAPI2_FOUND OR LibKFbAPI_FOUND)
  find_package(QJSON)
  set_package_properties(QJSON PROPERTIES DESCRIPTION "Qt library for handling JSON data" URL "http://qjson.sourceforge.net/" TYPE REQUIRED PURPOSE "Required to build the Google and Facebook resources")
endif()

67 68 69
include_directories(
  ${CMAKE_CURRENT_SOURCE_DIR}/shared
  ${CMAKE_CURRENT_BINARY_DIR}/shared
Laurent Montel's avatar
Laurent Montel committed
70
  ${CMAKE_CURRENT_SOURCE_DIR}/folderarchivesettings/
71 72
)

73 74


Laurent Montel's avatar
Laurent Montel committed
75 76 77
#add_definitions( -DQT_NO_CAST_FROM_ASCII )
#add_definitions( -DQT_NO_CAST_TO_ASCII )

78
set( AKONADI_SINGLEFILERESOURCE_SHARED_SOURCES
79
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourcebase.cpp
80 81 82
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialogbase.cpp
)

83
if (KDEPIM_MOBILE_UI)
84
set( AKONADI_SINGLEFILERESOURCE_SHARED_UI
85
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog_mobile.ui
David Jarvie's avatar
David Jarvie committed
86
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog.ui
87
)
88
else ()
89
set( AKONADI_SINGLEFILERESOURCE_SHARED_UI
90
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog_desktop.ui
David Jarvie's avatar
David Jarvie committed
91
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog.ui
92
)
93
endif ()
94

95
set( AKONADI_COLLECTIONATTRIBUTES_SHARED_SOURCES
96
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/collectionannotationsattribute.cpp
97
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/collectionflagsattribute.cpp
98 99
)

100 101
set( AKONADI_IMAPATTRIBUTES_SHARED_SOURCES
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/imapaclattribute.cpp
102
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/imapquotaattribute.cpp
103 104
)

105 106 107
#add_subdirectory( akonotes )
#add_subdirectory( kalarm )
#add_subdirectory( contacts )
Laurent Montel's avatar
Laurent Montel committed
108 109
add_subdirectory( dav )
#add_subdirectory( ical )
Laurent Montel's avatar
Laurent Montel committed
110
add_subdirectory( imap )
Laurent Montel's avatar
Laurent Montel committed
111
add_subdirectory( kdeaccounts )
112
#if (Libkolab_FOUND AND Libkolabxml_FOUND)
113
#    add_subdirectory( kolabproxy )
114
#    add_subdirectory( kolab )
115
#endif()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
116

117
add_subdirectory( localbookmarks )
Laurent Montel's avatar
Laurent Montel committed
118

119
#add_subdirectory( maildir )
Laurent Montel's avatar
Laurent Montel committed
120

121
#add_subdirectory( openxchange )
Laurent Montel's avatar
Laurent Montel committed
122
add_subdirectory( pop3 )
123

124 125 126
#if( LibKGAPI2_FOUND )
#  add_subdirectory( google )
#endif()
127

128 129 130 131
#if( LibKFbAPI_FOUND )
#  add_subdirectory( facebook )
#endif()

Laurent Montel's avatar
Laurent Montel committed
132
add_subdirectory( shared )
133
add_subdirectory( birthdays )
134
#add_subdirectory( mixedmaildir )
Laurent Montel's avatar
Laurent Montel committed
135
add_subdirectory( mailtransport_dummy )
136
#add_subdirectory( mbox )
Laurent Montel's avatar
Laurent Montel committed
137
add_subdirectory( nntp )
Laurent Montel's avatar
Laurent Montel committed
138 139
add_subdirectory( vcarddir )
add_subdirectory( icaldir )
140
#add_subdirectory( vcard )
Laurent Montel's avatar
Laurent Montel committed
141
add_subdirectory( folderarchivesettings )