summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 047111149..a51178baa 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -42,8 +42,12 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
__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} )
+ 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( )
# assuming that all newer system have gpgme >= 0.4
set( HAVE_GPGME_0_4_BRANCH 1 CACHE INTERNAL "" )