Statically link the OpenSSL library

This commit is contained in:
Xiaoge Su 2023-03-08 16:35:39 -08:00
parent 88eeb5a526
commit d618a7777c
1 changed files with 5 additions and 1 deletions

View File

@ -20,8 +20,12 @@ endif()
# SSL
################################################################################
find_package(OpenSSL REQUIRED)
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
set(OPENSSL_USE_STATIC_LIBS TRUE)
if (WIN32)
set(OPENSSL_MSVC_STATIC_RT ON)
endif()
find_package(OpenSSL REQUIRED)
add_compile_options(-DHAVE_OPENSSL)
################################################################################