cmake: link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17949)

This commit is contained in:
Gustavo Rocha Dias 2025-12-12 08:02:28 -03:00 committed by GitHub
parent c33a58bced
commit 2eaa2c65cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,10 @@ if (NOT MSVC)
endif() endif()
target_link_libraries (${TARGET} PRIVATE Threads::Threads) target_link_libraries (${TARGET} PRIVATE Threads::Threads)
if (WIN32 AND NOT MSVC)
target_link_libraries(${TARGET} PUBLIC ws2_32)
endif()
target_compile_features(${TARGET} PRIVATE cxx_std_17) target_compile_features(${TARGET} PRIVATE cxx_std_17)
target_compile_definitions(${TARGET} PRIVATE target_compile_definitions(${TARGET} PRIVATE