Sfoglia il codice sorgente

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

Gustavo Rocha Dias 1 mese fa
parent
commit
2eaa2c65cb
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      vendor/cpp-httplib/CMakeLists.txt

+ 4 - 0
vendor/cpp-httplib/CMakeLists.txt

@@ -9,6 +9,10 @@ if (NOT MSVC)
 endif()
 
 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_definitions(${TARGET} PRIVATE