mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
cmake: Fix parsing the gcrypt version
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -52,9 +52,9 @@ find_library(GCRYPT_LIBRARY
|
|||||||
set(GCRYPT_LIBRARIES ${GCRYPT_LIBRARY})
|
set(GCRYPT_LIBRARIES ${GCRYPT_LIBRARY})
|
||||||
|
|
||||||
if (GCRYPT_INCLUDE_DIR)
|
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)
|
endif (GCRYPT_INCLUDE_DIR)
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
Reference in New Issue
Block a user