aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindGCrypt.cmake
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-04-23 10:01:40 +0200
committerMarvin W <git@larma.de>2017-04-26 21:48:53 +0200
commiteddf17c68274c3e8ecf86a13858243159ffe9714 (patch)
treedb92b3ea3ffd453a16df9e53d0b454d172b8c8f2 /cmake/FindGCrypt.cmake
parent3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc (diff)
downloaddino-eddf17c68274c3e8ecf86a13858243159ffe9714.tar.gz
dino-eddf17c68274c3e8ecf86a13858243159ffe9714.zip
cmake/signal-protocol: shared lib, mark_as_advanced and others
Diffstat (limited to 'cmake/FindGCrypt.cmake')
-rw-r--r--cmake/FindGCrypt.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/FindGCrypt.cmake b/cmake/FindGCrypt.cmake
index 7c6b2173..250f90c9 100644
--- a/cmake/FindGCrypt.cmake
+++ b/cmake/FindGCrypt.cmake
@@ -39,10 +39,12 @@ if(GCrypt_CONFIG_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE)
gcrypt_config_fail(${ERRCODE})
- string(REGEX REPLACE "^(.* |)-l([^ ]*gcrypt[^ ]*)( .*|)$" "\\2" GCrypt_LIBRARY "${GCrypt_LDFLAGS}")
+ string(REGEX REPLACE "^(.* |)-l([^ ]*gcrypt[^ ]*)( .*|)$" "\\2" GCrypt_LIBRARY_NAME "${GCrypt_LDFLAGS}")
string(REGEX REPLACE "^(.* |)-L([^ ]*)( .*|)$" "\\2" GCrypt_LIBRARY_DIRS "${GCrypt_LDFLAGS}")
- find_library(LIB_NAME_GCrypt ${GCrypt_LIBRARY} HINTS ${GCrypt_LIBRARY_DIRS})
- set(GCrypt_LIBRARY ${LIB_NAME_GCrypt})
+ find_library(GCrypt_LIBRARY ${GCrypt_LIBRARY_NAME} HINTS ${GCrypt_LIBRARY_DIRS})
+ mark_as_advanced(GCrypt_LIBRARY)
+ unset(GCrypt_LIBRARY_NAME)
+ unset(GCrypt_LIBRARY_DIRS)
if(NOT TARGET gcrypt)
add_library(gcrypt INTERFACE IMPORTED)
@@ -54,4 +56,4 @@ endif(GCrypt_CONFIG_EXECUTABLE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GCrypt
REQUIRED_VARS GCrypt_LIBRARY
- VERSION_VAR GCrypt_VERSION) \ No newline at end of file
+ VERSION_VAR GCrypt_VERSION)