mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-04-03 18:00:08 +03:00
add build time check for EVP_PKEY_get_raw_public_key() presense in
OpenSSL lib
This commit is contained in:
parent
b6d31af188
commit
8554dc504c
@ -1,3 +1,5 @@
|
|||||||
|
include(CheckFunctionExists)
|
||||||
|
|
||||||
file(GLOB SOURCES_MAYAQUA "*.c" "Crypto/*.c")
|
file(GLOB SOURCES_MAYAQUA "*.c" "Crypto/*.c")
|
||||||
file(GLOB HEADERS_MAYAQUA "*.h" "Crypto/*.h")
|
file(GLOB HEADERS_MAYAQUA "*.h" "Crypto/*.h")
|
||||||
|
|
||||||
@ -30,6 +32,18 @@ target_link_libraries(mayaqua
|
|||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
|
||||||
|
|
||||||
|
check_function_exists(EVP_PKEY_get_raw_public_key HAVE_OPENSSL_EVP_PKEY)
|
||||||
|
|
||||||
|
unset(CMAKE_REQUIRED_INCLUDES)
|
||||||
|
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
if(NOT HAVE_OPENSSL_EVP_PKEY)
|
||||||
|
message(FATAL_ERROR "required EVP_PKEY_get_raw_public_key() is not found in OpenSSL library")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(mayaqua
|
set_target_properties(mayaqua
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
Loading…
Reference in New Issue
Block a user