Fix building client without OpenSSL

This commit is contained in:
badaix 2025-01-28 20:41:02 +01:00
parent 2addf7cc3d
commit 5a535fade8
3 changed files with 4 additions and 4 deletions

View file

@ -67,7 +67,7 @@ if(OpenSSL_FOUND)
add_compile_definitions(HAS_OPENSSL)
list(APPEND CLIENT_LIBRARIES OpenSSL::Crypto OpenSSL::SSL)
else()
message(STATUS "OpenSSL not found, building without wss support")
message(NOTICE "OpenSSL not found, building without SSL support")
endif()
if(ANDROID)

View file

@ -31,7 +31,9 @@
#include <boost/asio/strand.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/beast/core.hpp>
#ifdef HAS_OPENSSL
#include <boost/beast/ssl.hpp>
#endif
#include <boost/beast/websocket.hpp>
// standard headers
@ -46,9 +48,9 @@
namespace beast = boost::beast; // from <boost/beast.hpp>
namespace websocket = beast::websocket; // from <boost/beast/websocket.hpp>
using tcp_socket = boost::asio::ip::tcp::socket;
using ssl_socket = boost::asio::ssl::stream<tcp_socket>;
using tcp_websocket = websocket::stream<tcp_socket>;
#ifdef HAS_OPENSSL
using ssl_socket = boost::asio::ssl::stream<tcp_socket>;
using ssl_websocket = websocket::stream<ssl_socket>;
#endif

View file

@ -5,8 +5,6 @@ if(NOT WIN32 AND NOT ANDROID)
list(APPEND SOURCES daemon.cpp)
endif()
include_directories(${OPENSSL_INCLUDE_DIR})
if(SOXR_FOUND)
include_directories(${SOXR_INCLUDE_DIRS})
endif(SOXR_FOUND)