Commit ded58d15 authored by Nicolás Alvarez's avatar Nicolás Alvarez

Initial import from the monolithic kdepim.

This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://community.kde.org/Frameworks/GitOldHistory

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, kdepim master branch, at commit
d0009536f24e8c7f4cc32a70936f5c25194e9a6f
parents
cmake_minimum_required(VERSION 2.8.12)
project(Messagelib)
if(${CMAKE_SOURCE_DIR} STREQUAL ${Messagelib_SOURCE_DIR})
# ECM setup
find_package(ECM 5.16.0 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${Messagelib_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(KF5_VERSION "5.16.0")
set(KDEPIMLIBS_LIB_VERSION "5.1.42")
set(KDEPIM_LIB_VERSION "5.1.42")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
set(KLDAP_LIB_VERSION "4.80.0")
set(KPIMTEXTEDIT_LIB_VERSION "5.1.42")
set(KMAILTRANSPORT_LIB_VERSION "4.78.0")
set(IDENTITYMANAGEMENT_LIB_VERSION "4.80.0")
set(KCONTACTS_LIB_VERSION "4.92.0")
set(KMBOX_LIB_VERSION "4.78.0")
set(AKONADINOTES_LIB_VERSION "4.78.0")
set(KPIMTEXTEDIT_LIB_VERSION "5.1.42")
find_package(KF5Akonadi ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools Network WebKitWidgets)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommon ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5SendLater ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5FollowupReminder ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkdepim ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(Grantlee5 "5.0" CONFIG REQUIRED)
find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5WebKit ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiSearch "5.0.42" CONFIG REQUIRED)
set_package_properties(KF5AkonadiSearch PROPERTIES DESCRIPTION "The Akonadi Search libraries" URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Provides search capabilities in KMail and Akonadi")
find_package(Gpgme REQUIRED)
find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KaddressbookGrantlee ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5GrantleeTheme ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5IncidenceEditorsng ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Gravatar ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
endif()
add_subdirectory(messageviewer)
add_subdirectory(templateparser)
add_subdirectory(messagecomposer)
add_subdirectory(messagecore)
add_subdirectory(messagelist)
install( FILES messagelib.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
if(${CMAKE_SOURCE_DIR} STREQUAL ${Messagelib_SOURCE_DIR})
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
# - Try to find the gpgme library
#
# Algorithm:
# - Windows:
# On Windows, there's three gpgme variants: gpgme{,-glib,-qt}.
# - The variant used determines the event loop integration possible:
# - gpgme: no event loop integration possible, only synchronous operations supported
# - gpgme-glib: glib event loop integration possible, only asynchronous operations supported
# - gpgme-qt: qt event loop integration possible, only asynchronous operations supported
# - GPGME_{VANILLA,GLIB,QT}_{FOUND,LIBRARIES} will be set for each of the above
# - GPGME_INCLUDES is the same for all of the above
# - GPGME_FOUND is set if any of the above was found
# - *nix:
# There's also three variants: gpgme{,-pthread,-pth}.
# - The variant used determines the multithreaded use possible:
# - gpgme: no multithreading support available
# - gpgme-pthread: multithreading available using POSIX threads
# - gpgme-pth: multithreading available using GNU PTH (cooperative multithreading)
# - GPGME_{VANILLA,PTH,PTHREAD}_{FOUND,LIBRARIES} will be set for each of the above
# - GPGME_INCLUDES is the same for all of the above
# - GPGME_FOUND is set if any of the above was found
#
# GPGME_LIBRARY_DIR - the directory where the libraries are located
#
# THIS IS ALMOST A 1:1 COPY OF FindAssuan.cmake in kdepim.
# Any changes here likely apply there, too.
#
# do away with crappy condition repetition on else/endfoo
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS_gpgme_saved ${CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS} )
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
#if this is built-in, please replace, if it isn't, export into a MacroToBool.cmake of it's own
macro( macro_bool_to_bool FOUND_VAR )
foreach( _current_VAR ${ARGN} )
if ( ${FOUND_VAR} )
set( ${_current_VAR} TRUE )
else()
set( ${_current_VAR} FALSE )
endif()
endforeach()
endmacro()
#HACK: local copy...
MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
FOREACH (_current_VAR ${ARGN})
IF(${FOUND_VAR})
SET(${_current_VAR} 1)
ELSE(${FOUND_VAR})
SET(${_current_VAR} 0)
ENDIF(${FOUND_VAR})
ENDFOREACH(_current_VAR)
ENDMACRO(MACRO_BOOL_TO_01)
if ( WIN32 )
# On Windows, we don't have a gpgme-config script, so we need to
# look for the stuff ourselves:
# in cmake, AND and OR have the same precedence, there's no
# subexpressions, and expressions are evaluated short-circuit'ed
# IOW: CMake if() suxx.
# Starting with CMake 2.6.3 you can group if expressions with (), but we
# don't require 2.6.3 but 2.6.2, we can't use it. Alex
set( _seem_to_have_cached_gpgme false )
if ( GPGME_INCLUDES )
if ( GPGME_VANILLA_LIBRARIES OR GPGME_QT_LIBRARIES OR GPGME_GLIB_LIBRARIES )
set( _seem_to_have_cached_gpgme true )
endif()
endif()
if ( _seem_to_have_cached_gpgme )
macro_bool_to_bool( GPGME_VANILLA_LIBRARIES GPGME_VANILLA_FOUND )
macro_bool_to_bool( GPGME_GLIB_LIBRARIES GPGME_GLIB_FOUND )
macro_bool_to_bool( GPGME_QT_LIBRARIES GPGME_QT_FOUND )
# this would have been preferred:
#set( GPGME_*_FOUND macro_bool_to_bool(GPGME_*_LIBRARIES) )
if ( GPGME_VANILLA_FOUND OR GPGME_GLIB_FOUND OR GPGME_QT_FOUND )
set( GPGME_FOUND true )
else()
set( GPGME_FOUND false )
endif()
else()
# is this needed, of just unreflected cut'n'paste?
# this isn't a KDE library, after all!
if( NOT KDEWIN_FOUND )
find_package( KDEWIN REQUIRED )
endif()
set( GPGME_FOUND false )
set( GPGME_VANILLA_FOUND false )
set( GPGME_GLIB_FOUND false )
set( GPGME_QT_FOUND false )
find_path( GPGME_INCLUDES gpgme.h
${CMAKE_INCLUDE_PATH}
${CMAKE_INSTALL_PREFIX}/include
)
find_library( _gpgme_vanilla_library NAMES gpgme libgpgme gpgme-11 libgpgme-11
PATHS
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
find_library( _gpgme_glib_library NAMES gpgme-glib libgpgme-glib gpgme-glib-11 libgpgme-glib-11
PATHS
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
find_library( _gpgme_qt_library NAMES gpgme-qt libgpgme-qt gpgme-qt-11 libgpgme-qt-11
PATHS
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
find_library( _gpg_error_library NAMES gpg-error libgpg-error gpg-error-0 libgpg-error-0
PATHS
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
set( GPGME_INCLUDES ${GPGME_INCLUDES} )
if ( _gpgme_vanilla_library AND _gpg_error_library )
set( GPGME_VANILLA_LIBRARIES ${_gpgme_vanilla_library} ${_gpg_error_library} )
set( GPGME_VANILLA_FOUND true )
set( GPGME_FOUND true )
endif()
if ( _gpgme_glib_library AND _gpg_error_library )
set( GPGME_GLIB_LIBRARIES ${_gpgme_glib_library} ${_gpg_error_library} )
set( GPGME_GLIB_FOUND true )
set( GPGME_FOUND true )
endif()
if ( _gpgme_qt_library AND _gpg_error_library )
set( GPGME_QT_LIBRARIES ${_gpgme_qt_library} ${_gpg_error_library} )
set( GPGME_QT_FOUND true )
set( GPGME_FOUND true )
endif()
endif()
# these are Unix-only:
set( GPGME_PTHREAD_FOUND false )
set( GPGME_PTH_FOUND false )
set( HAVE_GPGME_PTHREAD 0 )
set( HAVE_GPGME_PTH 0 )
macro_bool_to_01( GPGME_FOUND HAVE_GPGME )
macro_bool_to_01( GPGME_VANILLA_FOUND HAVE_GPGME_VANILLA )
macro_bool_to_01( GPGME_GLIB_FOUND HAVE_GPGME_GLIB )
macro_bool_to_01( GPGME_QT_FOUND HAVE_GPGME_QT )
else() # not WIN32
# On *nix, we have the gpgme-config script which can tell us all we
# need to know:
# see WIN32 case for an explanation of what this does:
set( _seem_to_have_cached_gpgme false )
if ( GPGME_INCLUDES )
if ( GPGME_VANILLA_LIBRARIES OR GPGME_PTHREAD_LIBRARIES OR GPGME_PTH_LIBRARIES )
set( _seem_to_have_cached_gpgme true )
endif()
endif()
if ( _seem_to_have_cached_gpgme )