implement openssl crypto backend
This commit is contained in:
16
externals/CMakeLists.txt
vendored
16
externals/CMakeLists.txt
vendored
@@ -36,10 +36,6 @@ add_subdirectory(glad)
|
||||
# inih
|
||||
add_subdirectory(inih)
|
||||
|
||||
# mbedtls
|
||||
add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
|
||||
target_include_directories(mbedtls PUBLIC ./mbedtls/include)
|
||||
|
||||
# MicroProfile
|
||||
add_library(microprofile INTERFACE)
|
||||
target_include_directories(microprofile INTERFACE ./microprofile)
|
||||
@@ -93,10 +89,11 @@ endif()
|
||||
# Sirit
|
||||
add_subdirectory(sirit)
|
||||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
if (ENABLE_WEB_SERVICE OR YUZU_USE_OPENSSL_CRYPTO)
|
||||
find_package(OpenSSL 1.1)
|
||||
if (OPENSSL_FOUND)
|
||||
set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
|
||||
set(YUZU_CRYPTO_BACKEND OpenSSL::Crypto PARENT_SCOPE)
|
||||
else()
|
||||
# LibreSSL
|
||||
set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "")
|
||||
@@ -107,7 +104,10 @@ if (ENABLE_WEB_SERVICE)
|
||||
get_directory_property(OPENSSL_LIBRARIES
|
||||
DIRECTORY libressl
|
||||
DEFINITION OPENSSL_LIBS)
|
||||
target_include_directories(crypto INTERFACE ./libressl/include)
|
||||
set(YUZU_CRYPTO_BACKEND crypto PARENT_SCOPE)
|
||||
endif()
|
||||
set(YUZU_CRYPTO_DEFINITION -DYUZU_USE_OPENSSL_CRYPTO PARENT_SCOPE)
|
||||
|
||||
# httplib
|
||||
add_library(httplib INTERFACE)
|
||||
@@ -117,6 +117,12 @@ if (ENABLE_WEB_SERVICE)
|
||||
if (WIN32)
|
||||
target_link_libraries(httplib INTERFACE crypt32 cryptui ws2_32)
|
||||
endif()
|
||||
else()
|
||||
# mbedtls
|
||||
add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
|
||||
target_include_directories(mbedtls PUBLIC ./mbedtls/include)
|
||||
set(YUZU_CRYPTO_BACKEND mbedtls PARENT_SCOPE)
|
||||
set(YUZU_CRYPTO_DEFINITION -DYUZU_USE_MBEDTLS_CRYPTO PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
# Opus
|
||||
|
||||
Reference in New Issue
Block a user