CMakeLists.txt 5.7 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
Upgrade  
Laurent Montel committed
5
  find_package(ECM 1.3.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.4.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.75.0")
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
20 21 22 23 24

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

  # QT5 package
25
  find_package(Qt5WebKitWidgets ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
26 27 28 29 30 31 32 33 34

  # 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)
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
35
  find_package(KF5Contacts ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
36 37 38 39 40
  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
Laurent Montel committed
46
find_package(KF5AkonadiNotes ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
47
find_package(KF5Mbox ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
48 49

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

Laurent Montel's avatar
Laurent Montel committed
52 53


54 55 56
# 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.")
57

58
find_package(AccountsQt5 1.11 QUIET CONFIG)
59 60
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")

61
find_package(SignOnQt5 8.56 QUIET CONFIG)
62 63 64
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
Laurent Montel's avatar
Laurent Montel committed
65
find_package(KF5Kolab "1.0.0" QUIET CONFIG)
66 67 68 69 70 71 72
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
73
find_package(KF5FbAPI 1.0 QUIET CONFIG)
74 75
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" )

76 77 78 79 80
# KAccouunts bits
find_package(KAccounts CONFIG)
find_package(AccountsQt5 1.13 CONFIG)
find_package(SignOnQt5 8.57 CONFIG)

81
include_directories(
Laurent Montel's avatar
Laurent Montel committed
82 83
  ${CMAKE_CURRENT_SOURCE_DIR}/shared/singlefileresource/
  ${CMAKE_CURRENT_BINARY_DIR}/shared/singlefileresource/
Laurent Montel's avatar
Laurent Montel committed
84
  ${CMAKE_CURRENT_SOURCE_DIR}/folderarchivesettings/
85 86
)

87

88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
# 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 )


110

Laurent Montel's avatar
Laurent Montel committed
111 112 113
#add_definitions( -DQT_NO_CAST_FROM_ASCII )
#add_definitions( -DQT_NO_CAST_TO_ASCII )

Laurent Montel's avatar
Laurent Montel committed
114 115 116
add_subdirectory( akonotes )
add_subdirectory( kalarm )
add_subdirectory( contacts )
Laurent Montel's avatar
Laurent Montel committed
117
add_subdirectory( dav )
Laurent Montel's avatar
Laurent Montel committed
118
add_subdirectory( ical )
Laurent Montel's avatar
Laurent Montel committed
119
add_subdirectory( imap )
Laurent Montel's avatar
Laurent Montel committed
120
add_subdirectory( kdeaccounts )
Laurent Montel's avatar
Laurent Montel committed
121 122 123 124
if (KF5Kolab_FOUND AND Libkolabxml_FOUND)
    add_subdirectory( kolabproxy )
    add_subdirectory( kolab )
endif()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
125

126
add_subdirectory( localbookmarks )
Laurent Montel's avatar
Laurent Montel committed
127

Laurent Montel's avatar
Laurent Montel committed
128
add_subdirectory( maildir )
Laurent Montel's avatar
Laurent Montel committed
129

Laurent Montel's avatar
Laurent Montel committed
130
add_subdirectory( openxchange )
Laurent Montel's avatar
Laurent Montel committed
131
add_subdirectory( pop3 )
132

Laurent Montel's avatar
Laurent Montel committed
133 134
if( KF5GAPI_FOUND )
  add_subdirectory( google )
135 136
  # Disabled in KDE 4.14 - too many issues for stable release
  #add_subdirectory( gmail )
Laurent Montel's avatar
Laurent Montel committed
137
endif()
138

139
# Uncomment when api will fix
Laurent Montel's avatar
Laurent Montel committed
140 141 142
if( KF5FbAPI_FOUND )
  add_subdirectory( facebook )
endif()
143

Laurent Montel's avatar
Laurent Montel committed
144
add_subdirectory( shared )
145
add_subdirectory( birthdays )
Laurent Montel's avatar
Laurent Montel committed
146
add_subdirectory( mixedmaildir )
Laurent Montel's avatar
Laurent Montel committed
147
add_subdirectory( mailtransport_dummy )
Laurent Montel's avatar
Laurent Montel committed
148
add_subdirectory( mbox )
149
add_subdirectory( nntp )
Laurent Montel's avatar
Laurent Montel committed
150 151
add_subdirectory( vcarddir )
add_subdirectory( icaldir )
Laurent Montel's avatar
Laurent Montel committed
152
add_subdirectory( vcard )
Laurent Montel's avatar
Laurent Montel committed
153
add_subdirectory( folderarchivesettings )
154 155 156 157 158

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