1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00
This commit is contained in:
Frank Denis 2019-07-23 22:29:52 +02:00
parent fbd47e868c
commit 3f27018394

View File

@ -210,13 +210,11 @@ if(sodium_INCLUDE_DIR)
set(_VERSION_HEADER "${sodium_INCLUDE_DIR}/sodium/version.h")
if(EXISTS "${_VERSION_HEADER}")
file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT)
string(
REGEX
REPLACE
".*define[ \t]+SODIUM_VERSION_STRING[^\"]+\"([^\"]+)\".*"
"\\1"
sodium_VERSION_STRING
"${_VERSION_HEADER_CONTENT}")
string(REGEX
REPLACE ".*define[ \t]+SODIUM_VERSION_STRING[^\"]+\"([^\"]+)\".*"
"\\1"
sodium_VERSION_STRING
"${_VERSION_HEADER_CONTENT}")
set(sodium_VERSION_STRING "${sodium_VERSION_STRING}")
endif()
endif()