############### search packages used by KDE ###############
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
find_package(KdepimLibs 4.9.0 REQUIRED)
find_package(Boost 1.34.0)
macro_log_feature(Boost_FOUND "Boost" "Boost C++ Libraries" "http://www.boost.org" TRUE "1.34.0" "Required by Akonadi.")
set(AKONADI_MIN_VERSION 1.8.0)
find_package(Akonadi)
macro_log_feature(Akonadi_FOUND "Akonadi" "Akonadi server libraries" "http://pim.kde.org/akonadi" TRUE "${AKONADI_MIN_VERSION}" "Akonadi is required to build kdepim-runtime.")
set(SHARED_MIME_INFO_MINIMUM_VERSION "0.30")
find_package(SharedMimeInfo)
macro_log_feature(SHARED_MIME_INFO_FOUND "SMI" "SharedMimeInfo" "http://freedesktop.org/wiki/Software/shared-mime-info" TRUE "0.30" "SharedMimeInfo is required.")
find_package(LibXml2)
macro_log_feature(LIBXML2_FOUND "LibXML2" "Libraries used to develop XML applications" "http://xmlsoft.org" FALSE "" "Needed for building the knut Akonadi resource.")
macro_log_feature(SHAREDDESKTOPONTOLOGIES_FOUND "Shared desktop ontologies" "Desktop ontologies" "http://oscaf.sourceforge.net" TRUE "${SDO_MIN_VERSION}" "Ontologies necessary for the Nepomuk semantic desktop.")
find_package(Soprano)
macro_log_feature(Soprano_FOUND "Soprano" "Semantic Desktop Storing" "http://soprano.sourceforge.net" TRUE "${SOPRANO_MIN_VERSION}" "Soprano is needed for Nepomuk")
find_package(Nepomuk)
macro_log_feature(Nepomuk_FOUND "Nepomuk" "The Nepomuk libraries" "http://www.kde.org" TRUE "" "Nepomuk extends the search and tagging functionalities in KMail and Akonadi")
else( NOT KDEPIM_NO_NEPOMUK )
message( STATUS "Skipping detection of Nepomuk dependencies, feature is disabled." )
macro_log_feature(LibKGAPI_FOUND "LibKGAPI" "A library to access Google services" "http://projects.kde.org/libkgapi" FALSE "${LibKGAPI_MIN_VERSION}" "LibKGAPI is required to build Akonadi resources to access Google Contacts, Calendars and Tasks" )
if(LibKGAPI_FOUND)
find_package(QJSON)
macro_log_feature(QJSON_FOUND "QJSON" "Qt library for handling JSON data" "http://qjson.sourceforge.net/" TRUE)
endif()
############### search programs & libraries used by kdepim-runtime ###############
find_program(XSLTPROC_EXECUTABLE xsltproc)
macro_log_feature(XSLTPROC_EXECUTABLE "xsltproc" "The command line XSLT processor from libxslt" "http://xmlsoft.org/XSLT/" TRUE "" "Required for building Akonadi.")
macro_log_feature(STRIGIQTDBUSCLIENT_LIBRARY "Strigi Qt D-Bus client library" "Strigi built with indexing" "http://strigi.sourceforge.net/" FALSE "" "For Akonadi tools such as the message searchprovider")
find_package(Libkolab NO_MODULE 0.2)
macro_log_feature(Libkolab_FOUND "KolabLibraries" "The Kolab Format libraries" "http://mirror.kolabsys.com/pub/releases/" FALSE "0.2" "The Kolab Format libraries are required to build the Kolab Groupware Resource")
find_package(Libkolabxml NO_MODULE)
macro_log_feature(Libkolabxml_FOUND "Kolabxml" "The Kolab XML Format Schema Definitions Library" "http://mirror.kolabsys.com/pub/releases/" FALSE "" "The Kolab XML Format Schema Definitions Library is required to build the Kolab Groupware Resource")
############### Load the CTest options ###############
# CMake is irritating and doesn't allow setting the tests timeout globally.
# Let's work around this. The global timeout is now 2 minutes.
############### Desktop vs. Mobile options ##############
option(KDEPIM_MOBILE_UI "Build UI for mobile devices instead of for desktops" FALSE)
if (KDEPIM_MOBILE_UI)
macro_log_feature(QT_QTDECLARATIVE_FOUND "QtDeclarative" "Qt Declarative (QML) module" "http://qt.nokia.com" TRUE "4.7" "Required for building mobile UI")
add_definitions( -DKDEPIM_MOBILE_UI )
endif (KDEPIM_MOBILE_UI)
if(WINCE)
set(LIBRARY_TYPE STATIC)
add_definitions(-DKDEPIM_STATIC_LIBS)
else(WINCE)
set(LIBRARY_TYPE SHARED)
endif(WINCE)
#FIXME: kde4_add_plugin doesn't have a parameter to build the plugins statically.
option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
# config-enterprise.h is needed for both ENTERPRISE_BUILD and BUILD_EVERYTHING