From a4b12275546b8597b285034da34ffba0b163949a Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Mon, 22 Apr 2024 00:45:12 +0200 Subject: [PATCH] cmake: fix server example building on MSYS2 environments (Windows) --- examples/server/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index b6a6f8b..4087381 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -3,3 +3,7 @@ add_executable(${TARGET} server.cpp httplib.h json.hpp) install(TARGETS ${TARGET} RUNTIME) target_link_libraries(${TARGET} PRIVATE bark ${CMAKE_THREAD_LIBS_INIT}) + +if (WIN32) + target_link_libraries(${TARGET} PRIVATE ws2_32) +endif()