From 2ac514ea7ec0712b1bfa96b9154ee1e9cce4ed27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= <79349457+MehdiChinoune@users.noreply.github.com> Date: Sun, 15 Dec 2024 06:17:55 +0100 Subject: [PATCH] Fix building with CMake on MinGW-w64. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3029ac86..02fc8896 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,13 @@ if (NOT BOOST_COBALT_IS_ROOT) Boost::variant2 ) + if(MINGW) + target_link_libraries(boost_cobalt + PRIVATE + ws2_32 + ) + endif() + target_compile_definitions(boost_cobalt PUBLIC BOOST_COBALT_NO_LIB=1 PRIVATE BOOST_COBALT_SOURCE=1