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

Laurent Montel's avatar
Laurent Montel committed
4
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${resources_SOURCE_DIR}")
Laurent Montel's avatar
Laurent Montel committed
5
  find_package(ECM 1.0.0 CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
6 7 8 9 10 11 12 13 14 15
  set(CMAKE_MODULE_PATH ${resources_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})

  include(ECMPackageConfigHelpers)
  include(ECMSetupVersion)
  include(FeatureSummary)
  include(KDEInstallDirs)
  include(KDECMakeSettings)
  include(KDEFrameworkCompilerSettings)
  include(ECMInstallIcons)

Laurent Montel's avatar
Laurent Montel committed
16
  set(KF5_VERSION "5.0.0")
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  set(QT_REQUIRED_VERSION "5.2.0")

  set(KDEPIMLIBS_LIB_VERSION "4.70.0")

  set(KDEPIM_LIB_VERSION "4.70.0")
  set(KDEPIM_LIB_SOVERSION "5")

  # QT5 package
  find_package(Qt5WebKitWidgets ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)

  # KF5 package
  find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
  find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)

  # Kdepimlibs package
  find_package(KF5Akonadi ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5CalendarCore ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5PimUtils ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5Abc ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5PimIdentities ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5MailTransport ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5Mime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
  find_package(KF5AkonadiContact ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
41
endif()
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
42 43

find_package(KF5Imap ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
44
find_package(KF5AkonadiCalendar ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
45
find_package(KF5Mbox ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
46 47

# Extra package
Laurent Montel's avatar
Laurent Montel committed
48
find_package(KF5GAPI "4.70.0" CONFIG)
Laurent Montel's avatar
Laurent Montel committed
49

50 51 52
# 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.")
53

54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
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")

# 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" )

72 73 74
include_directories(
  ${CMAKE_CURRENT_SOURCE_DIR}/shared
  ${CMAKE_CURRENT_BINARY_DIR}/shared
Laurent Montel's avatar
Laurent Montel committed
75
  ${CMAKE_CURRENT_SOURCE_DIR}/folderarchivesettings/
76 77
)

78 79


Laurent Montel's avatar
Laurent Montel committed
80 81 82
#add_definitions( -DQT_NO_CAST_FROM_ASCII )
#add_definitions( -DQT_NO_CAST_TO_ASCII )

83
set( AKONADI_SINGLEFILERESOURCE_SHARED_SOURCES
84
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourcebase.cpp
85 86 87
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialogbase.cpp
)

88
if (KDEPIM_MOBILE_UI)
89
set( AKONADI_SINGLEFILERESOURCE_SHARED_UI
90
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog_mobile.ui
David Jarvie's avatar
David Jarvie committed
91
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog.ui
92
)
93
else ()
94
set( AKONADI_SINGLEFILERESOURCE_SHARED_UI
95
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog_desktop.ui
David Jarvie's avatar
David Jarvie committed
96
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog.ui
97
)
98
endif ()
99

100
set( AKONADI_COLLECTIONATTRIBUTES_SHARED_SOURCES
101
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/collectionannotationsattribute.cpp
102
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/collectionflagsattribute.cpp
103 104
)

105 106
set( AKONADI_IMAPATTRIBUTES_SHARED_SOURCES
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/imapaclattribute.cpp
107
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/imapquotaattribute.cpp
108 109
)

Laurent Montel's avatar
Laurent Montel committed
110 111 112
add_subdirectory( akonotes )
add_subdirectory( kalarm )
add_subdirectory( contacts )
Laurent Montel's avatar
Laurent Montel committed
113
add_subdirectory( dav )
Laurent Montel's avatar
Laurent Montel committed
114
add_subdirectory( ical )
Laurent Montel's avatar
Laurent Montel committed
115
add_subdirectory( imap )
Laurent Montel's avatar
Laurent Montel committed
116
add_subdirectory( kdeaccounts )
117
#if (Libkolab_FOUND AND Libkolabxml_FOUND)
118
#    add_subdirectory( kolabproxy )
119
#    add_subdirectory( kolab )
120
#endif()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
121

122
add_subdirectory( localbookmarks )
Laurent Montel's avatar
Laurent Montel committed
123

Laurent Montel's avatar
Laurent Montel committed
124
add_subdirectory( maildir )
Laurent Montel's avatar
Laurent Montel committed
125

Laurent Montel's avatar
Laurent Montel committed
126
add_subdirectory( openxchange )
Laurent Montel's avatar
Laurent Montel committed
127
add_subdirectory( pop3 )
128

Laurent Montel's avatar
Laurent Montel committed
129 130
if( KF5GAPI_FOUND )
  add_subdirectory( google )
131 132
  # Disabled in KDE 4.14 - too many issues for stable release
  #add_subdirectory( gmail )
Laurent Montel's avatar
Laurent Montel committed
133
endif()
134

135 136 137 138
#if( LibKFbAPI_FOUND )
#  add_subdirectory( facebook )
#endif()

Laurent Montel's avatar
Laurent Montel committed
139
add_subdirectory( shared )
140
add_subdirectory( birthdays )
Laurent Montel's avatar
Laurent Montel committed
141
add_subdirectory( mixedmaildir )
Laurent Montel's avatar
Laurent Montel committed
142
add_subdirectory( mailtransport_dummy )
Laurent Montel's avatar
Laurent Montel committed
143
add_subdirectory( mbox )
Laurent Montel's avatar
Laurent Montel committed
144
add_subdirectory( nntp )
Laurent Montel's avatar
Laurent Montel committed
145 146
add_subdirectory( vcarddir )
add_subdirectory( icaldir )
Laurent Montel's avatar
Laurent Montel committed
147
add_subdirectory( vcard )
Laurent Montel's avatar
Laurent Montel committed
148
add_subdirectory( folderarchivesettings )
149 150 151 152 153

if ("${CMAKE_SOURCE_DIR}" STREQUAL "${resources_SOURCE_DIR}")
  feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()