CMakeLists.txt 5.47 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.2.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.2.0")
Laurent Montel's avatar
Laurent Montel committed
17
  set(QT_REQUIRED_VERSION "5.3.0")
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
18

Laurent Montel's avatar
Laurent Montel committed
19
  set(KDEPIMLIBS_LIB_VERSION "4.71.0")
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

  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 42
  find_package(KF5Imap ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)

Laurent Montel's avatar
Laurent Montel committed
43
endif()
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
44

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

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

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

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

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

79

80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
# 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 )


102

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

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

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

Laurent Montel's avatar
Laurent Montel committed
120
add_subdirectory( maildir )
Laurent Montel's avatar
Laurent Montel committed
121

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

Laurent Montel's avatar
Laurent Montel committed
125 126
if( KF5GAPI_FOUND )
  add_subdirectory( google )
127 128
  # Disabled in KDE 4.14 - too many issues for stable release
  #add_subdirectory( gmail )
Laurent Montel's avatar
Laurent Montel committed
129
endif()
130

131 132 133 134
#if( LibKFbAPI_FOUND )
#  add_subdirectory( facebook )
#endif()

Laurent Montel's avatar
Laurent Montel committed
135
add_subdirectory( shared )
136
add_subdirectory( birthdays )
Laurent Montel's avatar
Laurent Montel committed
137
add_subdirectory( mixedmaildir )
Laurent Montel's avatar
Laurent Montel committed
138
add_subdirectory( mailtransport_dummy )
Laurent Montel's avatar
Laurent Montel committed
139
add_subdirectory( mbox )
Laurent Montel's avatar
Laurent Montel committed
140
add_subdirectory( nntp )
Laurent Montel's avatar
Laurent Montel committed
141 142
add_subdirectory( vcarddir )
add_subdirectory( icaldir )
Laurent Montel's avatar
Laurent Montel committed
143
add_subdirectory( vcard )
Laurent Montel's avatar
Laurent Montel committed
144
add_subdirectory( folderarchivesettings )
145 146 147 148 149

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