aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindGPGME.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindGPGME.cmake')
-rw-r--r--cmake/FindGPGME.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/FindGPGME.cmake b/cmake/FindGPGME.cmake
index 1bfefb95..2ab06d8c 100644
--- a/cmake/FindGPGME.cmake
+++ b/cmake/FindGPGME.cmake
@@ -39,10 +39,12 @@ if(GPGME_CONFIG_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE)
gpgme_config_fail(${ERRCODE})
- string(REGEX REPLACE "^(.* |)-l([^ ]*gpgme[^ ]*)( .*|)$" "\\2" GPGME_LIBRARY "${GPGME_LDFLAGS}")
+ string(REGEX REPLACE "^(.* |)-l([^ ]*gpgme[^ ]*)( .*|)$" "\\2" GPGME_LIBRARY_NAME "${GPGME_LDFLAGS}")
string(REGEX REPLACE "^(.* |)-L([^ ]*)( .*|)$" "\\2" GPGME_LIBRARY_DIRS "${GPGME_LDFLAGS}")
- find_library(LIB_NAME_GPGME ${GPGME_LIBRARY} HINTS ${GPGME_LIBRARY_DIRS})
- set(GPGME_LIBRARY ${LIB_NAME_GPGME})
+ find_library(GPGME_LIBRARY ${GPGME_LIBRARY_NAME} HINTS ${GPGME_LIBRARY_DIRS})
+ mark_as_advanced(GPGME_LIBRARY)
+ unset(GPGME_LIBRARY_NAME)
+ unset(GPGME_LIBRARY_DIRS)
if(NOT TARGET gpgme)
add_library(gpgme INTERFACE IMPORTED)
@@ -54,4 +56,4 @@ endif(GPGME_CONFIG_EXECUTABLE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GPGME
REQUIRED_VARS GPGME_LIBRARY
- VERSION_VAR GPGME_VERSION) \ No newline at end of file
+ VERSION_VAR GPGME_VERSION)