瀏覽代碼

add mingw support to libhv (#2015)

xpxz 2 年之前
父節點
當前提交
501bfddd11
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      packages/l/libhv/xmake.lua

+ 4 - 1
packages/l/libhv/xmake.lua

@@ -35,6 +35,9 @@ package("libhv")
         add_frameworks("CoreFoundation", "Security")
         add_frameworks("CoreFoundation", "Security")
     elseif is_plat("windows") then
     elseif is_plat("windows") then
         add_syslinks("advapi32")
         add_syslinks("advapi32")
+    elseif is_plat("mingw") then
+        add_syslinks("ws2_32")
+        add_syslinks("pthread")
     end
     end
 
 
     add_deps("cmake")
     add_deps("cmake")
@@ -54,7 +57,7 @@ package("libhv")
         end
         end
     end)
     end)
 
 
-    on_install("windows", "linux", "macosx", "android", "iphoneos", function(package)
+    on_install("windows", "linux", "macosx", "android", "iphoneos", "mingw", function(package)
         local configs = {"-DBUILD_EXAMPLES=OFF", "-DBUILD_UNITTEST=OFF"}
         local configs = {"-DBUILD_EXAMPLES=OFF", "-DBUILD_UNITTEST=OFF"}
         table.insert(configs, "-DBUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DBUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DBUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON"))
         table.insert(configs, "-DBUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON"))