summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-05 23:54:57 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-05 23:54:57 +0000
commitb67ece773ccb72aafa48a4117a9aae82531e3aaf (patch)
tree9dd91fcd5599ae865bea43313ed7068eb4ec0177 /ConfigureChecks.cmake
parenta21c1c9b1dca09b9ab3a56d60e6f4c7a253689f8 (diff)
downloadtdepim-b67ece773ccb72aafa48a4117a9aae82531e3aaf.tar.gz
tdepim-b67ece773ccb72aafa48a4117a9aae82531e3aaf.zip
[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
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake63
1 files changed, 63 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 000000000..047111149
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,63 @@
+#################################################
+#
+# (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_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOOK )
+
+ 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 are NOT found.\n gpgme library are installed?" )
+ 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 are correctly installed?\n Path to gpgme-config are corect?" )
+ endif( )
+ endmacro( )
+
+ __run_gpgme_config( version GPGME_VERSION )
+ __run_gpgme_config( cflags GPGME_INCLUDE_DIRS )
+ __run_gpgme_config( libs GPGME_LIBRARIES )
+
+ # cleanup
+ string( REGEX REPLACE "(^| )-I" ";" GPGME_INCLUDE_DIRS ${GPGME_INCLUDE_DIRS} )
+ string( REGEX REPLACE "(^| )-l" ";" GPGME_LIBRARIES ${GPGME_LIBRARIES} )
+
+ # 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( )
+
+# required stuff
+find_package( Qt )
+find_package( TQt )
+find_package( TDE )