summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-05 16:12:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-05 16:12:03 +0000
commit8fe3b4ad5db3bd37ed807404bd97fae838131d65 (patch)
tree3cc7b4a2855dba1ba9719e3a14dac780fe36646c
parent8772aedfc103fdde258318f6ebf24696cefc5eb0 (diff)
downloadtdepim-8fe3b4ad.tar.gz
tdepim-8fe3b4ad.zip
Fix gpg-error detection
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1251583 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--ConfigureChecks.cmake33
1 files changed, 31 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index f532c364..46dd4f28 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -66,7 +66,13 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
# 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?" )
+ 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?" )
endif( )
macro( __run_gpgme_config __type __var )
@@ -76,7 +82,18 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
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?" )
+ 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?" )
endif( )
endmacro( )
@@ -84,6 +101,10 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
__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 )
+
# cleanup
if( GPGME_INCLUDE_DIRS )
string( REGEX REPLACE "(^| )-I" ";" GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_DIRS}" )
@@ -91,6 +112,14 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
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 )
# assuming that all newer system have gpgme >= 0.4
set( HAVE_GPGME_0_4_BRANCH 1 CACHE INTERNAL "" )