diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e99a6ac79..2b9838a84 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -445,8 +445,8 @@ create_target_directory_groups(core) target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt open_source_archives) if (ENABLE_WEB_SERVICE) - add_definitions(-DENABLE_WEB_SERVICE) - target_link_libraries(core PUBLIC json-headers web_service) + target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE) + target_link_libraries(core PRIVATE json-headers web_service) endif() if (ARCHITECTURE_x86_64) diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt index 088509883..993ba9ac6 100644 --- a/src/web_service/CMakeLists.txt +++ b/src/web_service/CMakeLists.txt @@ -14,5 +14,5 @@ create_target_directory_groups(web_service) get_directory_property(OPENSSL_LIBS DIRECTORY ${CMAKE_SOURCE_DIR}/externals/libressl DEFINITION OPENSSL_LIBS) -target_compile_definitions(web_service PUBLIC -DCPPHTTPLIB_OPENSSL_SUPPORT) +target_compile_definitions(web_service PRIVATE -DCPPHTTPLIB_OPENSSL_SUPPORT) target_link_libraries(web_service PRIVATE common json-headers ${OPENSSL_LIBS} httplib lurlparser) diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index fc702a378..9b824e47d 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -6,9 +6,9 @@ #include #include #include +#include #include "common/announce_multiplayer_room.h" #include "common/logging/log.h" -#include "core/settings.h" #include "web_service/web_backend.h" namespace WebService { @@ -30,6 +30,8 @@ Client::Client(const std::string& host, const std::string& username, const std:: } } +Client::~Client() = default; + Common::WebResult Client::GenericJson(const std::string& method, const std::string& path, const std::string& data, const std::string& jwt, const std::string& username, const std::string& token) { diff --git a/src/web_service/web_backend.h b/src/web_service/web_backend.h index 955b91c7a..6cdf35b48 100644 --- a/src/web_service/web_backend.h +++ b/src/web_service/web_backend.h @@ -8,7 +8,6 @@ #include #include #include -#include #include "common/announce_multiplayer_room.h" #include "common/common_types.h" @@ -21,6 +20,7 @@ namespace WebService { class Client { public: Client(const std::string& host, const std::string& username, const std::string& token); + ~Client(); /** * Posts JSON to the specified path.