This is a C++ client for Toxiproxy. The implementation is ported from the Java Toxiproxy client.
To incorporate this client library in an existing CMake project, one can embed the client library directly using FetchContent
include(FetchContent)
FetchContent_Declare(
toxiproxy
GIT_REPOSITORY https://github.com/Bit-Quill/toxiproxy-cpp
)
# The client builds as a static library by default, to build it as a shared library set BUILD_TOXIPROXY_AS_SHARED to ON.
set(BUILD_TOXIPROXY_AS_SHARED ON CACHE INTERNAL "")
FetchContent_MakeAvailable(toxiproxy)
target_link_libraries(foo toxiproxy)
To build the library from source, run the following commands:
cmake -S . -G "Visual Studio 16 2019"
cmake --build . --config Release