aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-10-12 10:16:23 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-10-12 10:16:23 +0200
commitd3834f69bc3ddaccdccf6df09c5526224ece761d (patch)
treef2646fe559a3ba5fd1ea6e35241e42324b522d1e /cmake
parentf7b839412734ecb9675988e3167a06951c94da1a (diff)
downloadlibssh-d3834f69bc3ddaccdccf6df09c5526224ece761d.tar.gz
libssh-d3834f69bc3ddaccdccf6df09c5526224ece761d.tar.xz
libssh-d3834f69bc3ddaccdccf6df09c5526224ece761d.zip
cmake: Fix parsing the gcrypt version
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindGCrypt.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/Modules/FindGCrypt.cmake b/cmake/Modules/FindGCrypt.cmake
index 7b44408a..389a0314 100644
--- a/cmake/Modules/FindGCrypt.cmake
+++ b/cmake/Modules/FindGCrypt.cmake
@@ -52,9 +52,9 @@ find_library(GCRYPT_LIBRARY
set(GCRYPT_LIBRARIES ${GCRYPT_LIBRARY})
if (GCRYPT_INCLUDE_DIR)
- file(STRINGS "${GCRYPT_INCLUDE_DIR}/gcrypt.h" _gcrypt_version_str REGEX "^#define GCRYPT_VERSION \"[0-9]+.[0-9]+.[0-9]+\"")
+ file(STRINGS "${GCRYPT_INCLUDE_DIR}/gcrypt.h" _gcrypt_version_str REGEX "^#define GCRYPT_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]")
- string(REGEX REPLACE "^.*GCRYPT_VERSION.*([0-9]+.[0-9]+.[0-9]+).*" "\\1" GCRYPT_VERSION "${_gcrypt_version_str}")
+ string(REGEX REPLACE "^.*GCRYPT_VERSION.*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" GCRYPT_VERSION "${_gcrypt_version_str}")
endif (GCRYPT_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)