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) add_compile_definitions(HAS_OPENSSL)
list(APPEND CLIENT_LIBRARIES OpenSSL::Crypto OpenSSL::SSL) list(APPEND CLIENT_LIBRARIES OpenSSL::Crypto OpenSSL::SSL)
else() else()
message(STATUS "OpenSSL not found, building without wss support") message(NOTICE "OpenSSL not found, building without SSL support")
endif() endif()
if(ANDROID) if(ANDROID)

View file

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

View file

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