From a805270d023e35b2b4d7ce6707b90e8e44ef153e Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Wed, 25 Dec 2019 09:03:57 -0800 Subject: [PATCH] (ws client) use correct compilation defines so that spdlog is not used as a header only library (reduce binary size and increase compilation speed) --- docs/CHANGELOG.md | 6 +++++- ixwebsocket/IXWebSocketVersion.h | 2 +- test/CMakeLists.txt | 4 ++++ ws/CMakeLists.txt | 4 ++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f2108f5a..8b5c99ef 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,7 +1,11 @@ # Changelog All changes to this project will be documented in this file. -## [7.7.0] - 2019-12-24 +## [7.8.1] - 2019-12-25 + +(ws client) use correct compilation defines so that spdlog is not used as a header only library (reduce binary size and increase compilation speed) + +## [7.8.0] - 2019-12-24 (ws client) all commands use spdlog instead of std::cerr or std::cout for logging diff --git a/ixwebsocket/IXWebSocketVersion.h b/ixwebsocket/IXWebSocketVersion.h index 97f8246a..556d2e20 100644 --- a/ixwebsocket/IXWebSocketVersion.h +++ b/ixwebsocket/IXWebSocketVersion.h @@ -6,4 +6,4 @@ #pragma once -#define IX_WEBSOCKET_VERSION "7.8.0" +#define IX_WEBSOCKET_VERSION "7.7.1" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ce4277ac..37549fe0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,6 +23,8 @@ include_directories( ../ws ) +add_definitions(-DSPDLOG_COMPILED_LIB=1) + find_package(JsonCpp) if (NOT JSONCPP_FOUND) include_directories(../third_party/jsoncpp) @@ -98,4 +100,6 @@ target_link_libraries(ixwebsocket_unittest ixcrypto) target_link_libraries(ixwebsocket_unittest ixcore) target_link_libraries(ixwebsocket_unittest ixsentry) +target_link_libraries(ixwebsocket_unittest spdlog) + install(TARGETS ixwebsocket_unittest DESTINATION bin) diff --git a/ws/CMakeLists.txt b/ws/CMakeLists.txt index 6ec3551e..affa3b2a 100644 --- a/ws/CMakeLists.txt +++ b/ws/CMakeLists.txt @@ -25,6 +25,8 @@ include_directories(ws ../third_party/statsd-client-cpp/src) include_directories(ws ../third_party/spdlog/include) include_directories(ws ../third_party/cpp-linenoise) +add_definitions(-DSPDLOG_COMPILED_LIB=1) + if (UNIX) set( STATSD_CLIENT_SOURCES ../third_party/statsd-client-cpp/src/statsd_client.cpp) endif() @@ -72,6 +74,8 @@ target_link_libraries(ws ixcrypto) target_link_libraries(ws ixcore) target_link_libraries(ws ixsentry) +target_link_libraries(ws spdlog) + if(NOT APPLE AND NOT USE_MBED_TLS) find_package(OpenSSL REQUIRED) add_definitions(${OPENSSL_DEFINITIONS})