mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-06 00:17:39 +00:00
22 lines
603 B
CMake
22 lines
603 B
CMake
if (WITH_TLS)
|
|
set(OPENSSL_ROOT_DIR ${XMRIG_DEPS})
|
|
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
|
set(OPENSSL_MSVC_STATIC_RT TRUE)
|
|
|
|
find_package(OpenSSL)
|
|
|
|
if (OPENSSL_FOUND)
|
|
set(TLS_SOURCES src/common/net/Tls.h src/common/net/Tls.cpp)
|
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
|
else()
|
|
message(FATAL_ERROR "OpenSSL NOT found: use `-DWITH_TLS=OFF` to build without TLS support")
|
|
endif()
|
|
|
|
if (WIN32)
|
|
set(EXTRA_LIBS ${EXTRA_LIBS} Crypt32)
|
|
endif()
|
|
else()
|
|
set(TLS_SOURCES "")
|
|
set(OPENSSL_LIBRARIES "")
|
|
add_definitions(/DXMRIG_NO_TLS)
|
|
endif()
|