Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2021-03-26 12:27:00 +0300
committereidheim <eidheim@gmail.com>2021-03-26 12:27:00 +0300
commit6a557bfc91bd7a1de927b8e24dfaf4992ed506d2 (patch)
treeb6d09e44970da817cc1adf9af1128d27821e456a
parentdaafe592bbac1771db3fc219bfb99ba6c8d51409 (diff)
Make use of ASIO_STANDALONE when using standalone asio in order to compile on older asio versions without boost
-rw-r--r--CMakeLists.txt2
-rw-r--r--asio_compatibility.hpp4
-rw-r--r--client_wss.hpp2
-rw-r--r--server_wss.hpp2
-rw-r--r--utility.hpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11e11f1..5c83068 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ target_link_libraries(simple-websocket-server INTERFACE ${CMAKE_THREAD_LIBS_INIT
# TODO 2020 when Debian Jessie LTS ends:
# Remove Boost system, thread, regex components; use Boost::<component> aliases; remove Boost target_include_directories
if(USE_STANDALONE_ASIO)
- target_compile_definitions(simple-websocket-server INTERFACE USE_STANDALONE_ASIO)
+ target_compile_definitions(simple-websocket-server INTERFACE ASIO_STANDALONE)
find_path(ASIO_PATH asio.hpp)
if(NOT ASIO_PATH)
message(FATAL_ERROR "Standalone Asio not found")
diff --git a/asio_compatibility.hpp b/asio_compatibility.hpp
index c2e0b66..5a7007d 100644
--- a/asio_compatibility.hpp
+++ b/asio_compatibility.hpp
@@ -3,7 +3,7 @@
#include <memory>
-#ifdef USE_STANDALONE_ASIO
+#ifdef ASIO_STANDALONE
#include <asio.hpp>
#include <asio/steady_timer.hpp>
namespace SimpleWeb {
@@ -27,7 +27,7 @@ namespace SimpleWeb {
#endif
namespace SimpleWeb {
-#if(USE_STANDALONE_ASIO && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300
+#if(ASIO_STANDALONE && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300
using io_context = asio::io_context;
using resolver_results = asio::ip::tcp::resolver::results_type;
using async_connect_endpoint = asio::ip::tcp::endpoint;
diff --git a/client_wss.hpp b/client_wss.hpp
index 9c5d1e0..6086c7f 100644
--- a/client_wss.hpp
+++ b/client_wss.hpp
@@ -3,7 +3,7 @@
#include "client_ws.hpp"
-#ifdef USE_STANDALONE_ASIO
+#ifdef ASIO_STANDALONE
#include <asio/ssl.hpp>
#else
#include <boost/asio/ssl.hpp>
diff --git a/server_wss.hpp b/server_wss.hpp
index db1aed6..7e21ef3 100644
--- a/server_wss.hpp
+++ b/server_wss.hpp
@@ -5,7 +5,7 @@
#include <algorithm>
#include <openssl/ssl.h>
-#ifdef USE_STANDALONE_ASIO
+#ifdef ASIO_STANDALONE
#include <asio/ssl.hpp>
#else
#include <boost/asio/ssl.hpp>
diff --git a/utility.hpp b/utility.hpp
index 3b41ff3..d9119de 100644
--- a/utility.hpp
+++ b/utility.hpp
@@ -27,7 +27,7 @@
namespace SimpleWeb {
using string_view = std::string_view;
}
-#elif !defined(USE_STANDALONE_ASIO)
+#elif !defined(ASIO_STANDALONE)
#include <boost/utility/string_ref.hpp>
namespace SimpleWeb {
using string_view = boost::string_ref;