CMakeLists.txt 5.24 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.14 CONFIG REQUIRED)
5 6 7 8 9 10 11 12
set(CMAKE_MODULE_PATH ${resources_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})

include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)
Laurent Montel's avatar
Laurent Montel committed
13
include(ECMInstallIcons)
14

Laurent Montel's avatar
Cleanup  
Laurent Montel committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#if ("${CMAKE_SOURCE_DIR}" STREQUAL "${resources_SOURCE_DIR}")
  set(KF5_VERSION "4.100.0")
  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)
#endif()

find_package(KF5Imap ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)

Laurent Montel's avatar
Laurent Montel committed
45 46 47 48

# Extra package
find_package(KF5GAPI "4.98.0" CONFIG)

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

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

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

77 78


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

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

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

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

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

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

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

123
#add_subdirectory( maildir )
Laurent Montel's avatar
Laurent Montel committed
124

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

128 129
#NEED TO REMOVE QSJON SUPPORT
#if( KF5GAPI_FOUND )
130 131
#  add_subdirectory( google )
#endif()
132

133 134 135 136
#if( LibKFbAPI_FOUND )
#  add_subdirectory( facebook )
#endif()

Laurent Montel's avatar
Laurent Montel committed
137
add_subdirectory( shared )
138
add_subdirectory( birthdays )
139
#add_subdirectory( mixedmaildir )
Laurent Montel's avatar
Laurent Montel committed
140
add_subdirectory( mailtransport_dummy )
141
#FIX LINKING add_subdirectory( mbox )
Laurent Montel's avatar
Laurent Montel committed
142
add_subdirectory( nntp )
Laurent Montel's avatar
Laurent Montel committed
143 144
add_subdirectory( vcarddir )
add_subdirectory( icaldir )
145
#add_subdirectory( vcard )
Laurent Montel's avatar
Laurent Montel committed
146
add_subdirectory( folderarchivesettings )