|
|
|
@ -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 "" )
|
|
|
|
|