瀏覽代碼

Fix mingw compilation

In order to compile enet on mingw, you need to link against winmm and
ws2_32. This explicitly makes those libraries required on mingw
James Rowe 6 年之前
父節點
當前提交
6cc8cc8a26
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      CMakeLists.txt

+ 4 - 0
CMakeLists.txt

@@ -68,3 +68,7 @@ add_library(enet STATIC
         unix.c
         win32.c
     )
+
+if (MINGW)
+    target_link_libraries(enet winmm ws2_32)
+endif()