CMakeLists.txt 6.38 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.1.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.1.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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
# resource tests
macro( akonadi_add_resourcetest _testname _script )
  if ( ${EXECUTABLE_OUTPUT_PATH} )
    set( _exepath ${EXECUTABLE_OUTPUT_PATH} )
  else ()
    set( _exepath ${kdepim-runtime_BINARY_DIR}/resourcetester )
  endif ()
  if (WIN32)
    set(_resourcetester ${_exepath}/resourcetester.bat)
  else ()
    set(_resourcetester ${_exepath}/resourcetester)
  endif ()
  if (UNIX)
    set(_resourcetester ${_resourcetester}.shell)
  endif ()
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${_script} ${CMAKE_CURRENT_BINARY_DIR}/${_script} COPYONLY)
  if (KDEPIM_RUN_ISOLATED_TESTS)
    add_test( akonadi-mysql-db-${_testname} akonaditest -c ${kdepim-runtime_SOURCE_DIR}/resourcetester/tests/unittestenv/config-mysql-db.xml ${_resourcetester} -c ${CMAKE_CURRENT_BINARY_DIR}/${_script} )
  endif ()
endmacro( akonadi_add_resourcetest )


101

Laurent Montel's avatar
Laurent Montel committed
102 103 104
#add_definitions( -DQT_NO_CAST_FROM_ASCII )
#add_definitions( -DQT_NO_CAST_TO_ASCII )

105
set( AKONADI_SINGLEFILERESOURCE_SHARED_SOURCES
106
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourcebase.cpp
107 108 109
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialogbase.cpp
)

110
if (KDEPIM_MOBILE_UI)
111
set( AKONADI_SINGLEFILERESOURCE_SHARED_UI
112
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog_mobile.ui
David Jarvie's avatar
David Jarvie committed
113
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog.ui
114
)
115
else ()
116
set( AKONADI_SINGLEFILERESOURCE_SHARED_UI
117
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog_desktop.ui
David Jarvie's avatar
David Jarvie committed
118
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresourceconfigdialog.ui
119
)
120
endif ()
121

122
set( AKONADI_COLLECTIONATTRIBUTES_SHARED_SOURCES
123
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/collectionannotationsattribute.cpp
124
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/collectionflagsattribute.cpp
125 126
)

127 128
set( AKONADI_IMAPATTRIBUTES_SHARED_SOURCES
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/imapaclattribute.cpp
129
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/imapquotaattribute.cpp
130 131
)

Laurent Montel's avatar
Laurent Montel committed
132 133 134
add_subdirectory( akonotes )
add_subdirectory( kalarm )
add_subdirectory( contacts )
Laurent Montel's avatar
Laurent Montel committed
135
add_subdirectory( dav )
Laurent Montel's avatar
Laurent Montel committed
136
add_subdirectory( ical )
Laurent Montel's avatar
Laurent Montel committed
137
add_subdirectory( imap )
Laurent Montel's avatar
Laurent Montel committed
138
add_subdirectory( kdeaccounts )
139
#if (Libkolab_FOUND AND Libkolabxml_FOUND)
140
#    add_subdirectory( kolabproxy )
141
#    add_subdirectory( kolab )
142
#endif()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
143

144
add_subdirectory( localbookmarks )
Laurent Montel's avatar
Laurent Montel committed
145

Laurent Montel's avatar
Laurent Montel committed
146
add_subdirectory( maildir )
Laurent Montel's avatar
Laurent Montel committed
147

Laurent Montel's avatar
Laurent Montel committed
148
add_subdirectory( openxchange )
Laurent Montel's avatar
Laurent Montel committed
149
add_subdirectory( pop3 )
150

Laurent Montel's avatar
Laurent Montel committed
151 152
if( KF5GAPI_FOUND )
  add_subdirectory( google )
153 154
  # Disabled in KDE 4.14 - too many issues for stable release
  #add_subdirectory( gmail )
Laurent Montel's avatar
Laurent Montel committed
155
endif()
156

157 158 159 160
#if( LibKFbAPI_FOUND )
#  add_subdirectory( facebook )
#endif()

Laurent Montel's avatar
Laurent Montel committed
161
add_subdirectory( shared )
162
add_subdirectory( birthdays )
Laurent Montel's avatar
Laurent Montel committed
163
add_subdirectory( mixedmaildir )
Laurent Montel's avatar
Laurent Montel committed
164
add_subdirectory( mailtransport_dummy )
Laurent Montel's avatar
Laurent Montel committed
165
add_subdirectory( mbox )
Laurent Montel's avatar
Laurent Montel committed
166
add_subdirectory( nntp )
Laurent Montel's avatar
Laurent Montel committed
167 168
add_subdirectory( vcarddir )
add_subdirectory( icaldir )
Laurent Montel's avatar
Laurent Montel committed
169
add_subdirectory( vcard )
Laurent Montel's avatar
Laurent Montel committed
170
add_subdirectory( folderarchivesettings )
171 172 173 174 175

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