From 3dacd004ae8baca62a3cae918e5115fcb73184f4 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 15 Dec 2024 19:02:49 +0300 Subject: [PATCH] Added linking log_setup with ws2_32 on MinGW-w64. The dependency is introduced by Boost.ASIO, when it is enabled. Closes https://github.com/boostorg/log/pull/241. --- CMakeLists.txt | 4 ++++ doc/changelog.qbk | 1 + 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cf8f007e..97ad27828 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -326,6 +326,9 @@ if (WIN32 OR CYGWIN) mswsock advapi32 ) + list(APPEND boost_log_setup_private_libs + ws2_32 + ) endif() if (CMAKE_SYSTEM_NAME STREQUAL "Linux") @@ -655,6 +658,7 @@ if (NOT BOOST_LOG_WITHOUT_SETTINGS_PARSERS) target_link_libraries(boost_log_setup PRIVATE + ${boost_log_setup_private_libs} ${boost_log_common_private_linkflags} ) else() diff --git a/doc/changelog.qbk b/doc/changelog.qbk index dd75471a2..e32d04838 100644 --- a/doc/changelog.qbk +++ b/doc/changelog.qbk @@ -12,6 +12,7 @@ [heading 2.31, Boost 1.88] * Disabled usage of `std::codecvt` and `std::codecvt` locale facets in C++20 and later modes as they were deprecated in C++20. This means character code conversions to/from `char16_t` and `char32_t` is no longer available in C++20 and later. +* Fixed building issues when using CMake and MinGW-w64. ([pull_request 241]) [heading 2.30, Boost 1.87]