summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-10-18 16:13:07 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-10-18 17:22:40 +0200
commit11226549a5b7a2e037ba40c0be9fcfeba0abdabc (patch)
tree37ddc535a43ddabd022af50ebbef70d993783155
parent2128c14fb2cfce9512f957fe2475c1ef196156a4 (diff)
downloadtdepim-11226549a5b7a2e037ba40c0be9fcfeba0abdabc.tar.gz
tdepim-11226549a5b7a2e037ba40c0be9fcfeba0abdabc.zip
Fix libgpg-error detection for libgpg-error >= 1.46.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 4d5c3fc1cd01ed966acd0727e728d1ac5c4df433)
-rw-r--r--ConfigureChecks.cmake20
1 files changed, 8 insertions, 12 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 2f158cd99..c025f5ee2 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -80,9 +80,9 @@ if( BUILD_LIBTDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
endif( )
# find gpg-error-config
- find_program( GPG_ERR_EXECUTABLE NAMES gpg-error-config )
+ find_program( GPG_ERR_EXECUTABLE NAMES gpgrt-config gpg-error-config )
if( NOT GPG_ERR_EXECUTABLE )
- tde_message_fatal( "gpg-error-config was NOT found.\n gpg-error library is installed?" )
+ tde_message_fatal( "gpgrt-config or gpg-error-config was NOT found.\n gpg-error library is installed?" )
endif( )
macro( __run_gpgme_config __type __var )
@@ -117,23 +117,19 @@ if( BUILD_LIBTDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
# cleanup
if( GPGME_INCLUDE_DIRS )
- string( REGEX REPLACE "(^| )-I" ";" GPGME_INCLUDE_DIRS "${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}" )
+ string( REGEX REPLACE "(^| +)-l" ";" GPGME_LIBRARIES "${GPGME_LIBRARIES}" )
endif( )
if( GPGERR_INCLUDE_DIRS )
- string( REGEX REPLACE "(^| )-I" ";" GPGERR_INCLUDE_DIRS "${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}" )
+ 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 )
+ 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 "" )