[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
#################################################
|
|
|
|
#
|
|
|
|
# (C) 2010-2011 Serghei Amelian
|
|
|
|
# serghei (DOT) amelian (AT) gmail.com
|
|
|
|
#
|
|
|
|
# Improvements and feedback are welcome
|
|
|
|
#
|
|
|
|
# This file is released under GPL >= 2
|
|
|
|
#
|
|
|
|
#################################################
|
|
|
|
|
|
|
|
if( BUILD_LIBKDEPIM OR BUILD_KMAIL )
|
|
|
|
option( KDEPIM_NEW_DISTRLISTS "Define if you want to use the new distribution lists" ON )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
if( BUILD_INDEXLIB OR BUILD_KMAIL )
|
|
|
|
|
|
|
|
# check for stl coping with namespace std
|
|
|
|
tde_save( CMAKE_CXX_FLAGS )
|
|
|
|
string( REGEX REPLACE "-include tqt.h" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
|
|
|
|
check_cxx_source_compiles("
|
|
|
|
#include <iterator>
|
|
|
|
struct s : public std::iterator<std::forward_iterator_tag, int> {};
|
|
|
|
int main(int, char**) { return 0; } "
|
|
|
|
HAVE_STLNAMESPACE )
|
|
|
|
tde_restore( CMAKE_CXX_FLAGS )
|
|
|
|
if( HAVE_STLNAMESPACE )
|
|
|
|
set( STD_NAMESPACE_PREFIX "std::" )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
if( BUILD_KMOBILE )
|
|
|
|
# FIXME not checked because Gentoo don't provide baudboy.h
|
|
|
|
check_include_file( "baudboy.h" HAVE_BAUDBOY_H )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
if( BUILD_KANDY OR (BUILD_KMOBILE AND NOT HAVE_BAUDBOY_H) )
|
|
|
|
check_include_file( "lockdev.h" HAVE_LOCKDEV_H )
|
|
|
|
if( HAVE_LOCKDEV_H )
|
|
|
|
check_library_exists( lockdev dev_unlock "" HAVE_LOCKDEV )
|
|
|
|
if( HAVE_LOCKDEV )
|
|
|
|
set( LOCKDEV_LIBRARY lockdev CACHE INTERNAL "" FORCE )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
if( WITH_GNOKII AND (BUILD_KADDRESSBOOK OR BUILD_KMOBILE) )
|
|
|
|
pkg_search_module( GNOKII gnokii )
|
|
|
|
if( NOT GNOKII_FOUND )
|
|
|
|
tde_message_fatal( "gnokii are requested, but was not found on your system" )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOOK OR BUILD_KONTACT )
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
|
|
|
|
if( NOT HAVE_GPGME_0_4_BRANCH )
|
|
|
|
message( STATUS "checking for 'gpgme'" )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
# find gpgme-config
|
|
|
|
find_program( GPGME_EXECUTABLE NAMES gpgme-config )
|
|
|
|
if( NOT GPGME_EXECUTABLE )
|
|
|
|
tde_message_fatal( "gpgme-config was NOT found.\n gpgme library is installed?" )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
# find gpg-error-config
|
|
|
|
find_program( GPG_ERR_EXECUTABLE NAMES gpg-error-config )
|
|
|
|
if( NOT GPG_ERR_EXECUTABLE )
|
|
|
|
tde_message_fatal( "gpg-error-config was NOT found.\n gpg-error library is installed?" )
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
endif( )
|
|
|
|
|
|
|
|
macro( __run_gpgme_config __type __var )
|
|
|
|
execute_process(
|
|
|
|
COMMAND ${GPGME_EXECUTABLE} --${__type}
|
|
|
|
OUTPUT_VARIABLE ${__var}
|
|
|
|
RESULT_VARIABLE __result
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
|
|
|
if( _result )
|
|
|
|
tde_message_fatal( "Unable to run ${GPGME_EXECUTABLE}!\n gpgme library incorrectly installed?\n Path to gpgme-config incorrect?" )
|
|
|
|
endif( )
|
|
|
|
endmacro( )
|
|
|
|
|
|
|
|
macro( __run_gpgerr_config __type __var )
|
|
|
|
execute_process(
|
|
|
|
COMMAND ${GPG_ERR_EXECUTABLE} --${__type}
|
|
|
|
OUTPUT_VARIABLE ${__var}
|
|
|
|
RESULT_VARIABLE __result
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
|
|
|
if( _result )
|
|
|
|
tde_message_fatal( "Unable to run ${GPG_ERR_EXECUTABLE}!\n gpg-error library incorrectly installed?\n Path to gpgme-config are incorrect?" )
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
endif( )
|
|
|
|
endmacro( )
|
|
|
|
|
|
|
|
__run_gpgme_config( version GPGME_VERSION )
|
|
|
|
__run_gpgme_config( cflags GPGME_INCLUDE_DIRS )
|
|
|
|
__run_gpgme_config( libs GPGME_LIBRARIES )
|
|
|
|
|
|
|
|
__run_gpgerr_config( version GPGERR_VERSION )
|
|
|
|
__run_gpgerr_config( cflags GPGERR_INCLUDE_DIRS )
|
|
|
|
__run_gpgerr_config( libs GPGERR_LIBRARIES )
|
|
|
|
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
# cleanup
|
|
|
|
if( GPGME_INCLUDE_DIRS )
|
|
|
|
string( REGEX REPLACE "(^| )-I" ";" GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_DIRS}" )
|
|
|
|
endif( )
|
|
|
|
if( GPGME_LIBRARIES )
|
|
|
|
string( REGEX REPLACE "(^| )-l" ";" GPGME_LIBRARIES "${GPGME_LIBRARIES}" )
|
|
|
|
endif( )
|
|
|
|
if( GPGERR_INCLUDE_DIRS )
|
|
|
|
string( REGEX REPLACE "(^| )-I" ";" GPGERR_INCLUDE_DIRS "${GPGERR_INCLUDE_DIRS}" )
|
|
|
|
endif( )
|
|
|
|
if( GPGERR_LIBRARIES )
|
|
|
|
string( REGEX REPLACE "(^| )-l" ";" GPGERR_LIBRARIES "${GPGERR_LIBRARIES}" )
|
|
|
|
endif( )
|
|
|
|
set( GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_DIRS} ${GPGERR_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE )
|
|
|
|
set( GPGME_LIBRARIES "${GPGME_LIBRARIES} ${GPGERR_LIBRARIES}" CACHE INTERNAL "" FORCE )
|
|
|
|
string( REGEX REPLACE " ;" ";" GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_DIRS}" )
|
|
|
|
string( REGEX REPLACE " ;" ";" GPGME_LIBRARIES "${GPGME_LIBRARIES}" )
|
|
|
|
set( GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE )
|
|
|
|
set( GPGME_LIBRARIES "${GPGME_LIBRARIES}" CACHE INTERNAL "" FORCE )
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
|
|
|
|
# assuming that all newer system have gpgme >= 0.4
|
|
|
|
set( HAVE_GPGME_0_4_BRANCH 1 CACHE INTERNAL "" )
|
|
|
|
|
|
|
|
# NOTE: assume we have largefile support (need for gpgme)
|
|
|
|
# FIXME: to be sure, we must check it
|
|
|
|
add_definitions( -D_FILE_OFFSET_BITS=64 )
|
|
|
|
|
|
|
|
if( NOT HAVE_GPGME_0_4_BRANCH )
|
|
|
|
message( STATUS " found 'gpgme', version ${GPGME_VERSION}" )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
if( BUILD_KARM AND WITH_XSCREENSAVER )
|
|
|
|
check_library_exists( Xss XScreenSaverQueryInfo "" HAVE_XSSLIB )
|
|
|
|
if( HAVE_XSSLIB )
|
|
|
|
pkg_search_module( XSS xscrnsaver )
|
|
|
|
else( )
|
|
|
|
check_library_exists( Xext XScreenSaverQueryInfo "" HAVE_XSSLIB )
|
|
|
|
if( HAVE_XSSLIB )
|
|
|
|
pkg_search_module( XSS xext )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
check_include_file( X11/extensions/scrnsaver.h HAVE_XSCREENSAVER_H )
|
|
|
|
if( HAVE_XSSLIB AND HAVE_XSCREENSAVER_H )
|
|
|
|
set( HAVE_LIBXSS 1 )
|
|
|
|
else( )
|
|
|
|
tde_message_fatal( "xscreensaver is requested, but was not found on your system" )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
# required stuff
|
|
|
|
find_package( TQt )
|
|
|
|
find_package( TDE )
|