From e306f2d8a2b400f7a2cd7b6738140e92f0e29830 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 10 Oct 2020 09:10:51 +0800 Subject: [PATCH] support mingw for libuv --- packages/l/libuv/xmake.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/l/libuv/xmake.lua b/packages/l/libuv/xmake.lua index f7854af6a..fa7664494 100644 --- a/packages/l/libuv/xmake.lua +++ b/packages/l/libuv/xmake.lua @@ -23,8 +23,10 @@ package("libuv") add_deps("autoconf", "automake", "libtool", "pkg-config") end - on_load("windows", function (package) - package:add("links", "uv" .. (package:config("shared") and "" or "_a")) + on_load("windows", "mingw@linux,macosx", function (package) + if package:is_plat("windows") then + package:add("links", "uv" .. (package:config("shared") and "" or "_a")) + end package:add("syslinks", "advapi32", "iphlpapi", "psapi", "user32", "userenv", "ws2_32", "kernel32", "gdi32", "winspool", "shell32", "ole32", "oleaut32", "uuid", "comdlg32") end) @@ -37,10 +39,10 @@ package("libuv") os.cp("include", package:installdir()) end) - on_install("macosx", "linux", "iphoneos", "android@linux,macosx", function (package) + on_install("macosx", "linux", "iphoneos", "android@linux,macosx", "mingw@linux,macosx", function (package) import("package.tools.autoconf").install(package, {"--enable-shared=no"}) end) on_test(function (package) assert(package:has_cfuncs("uv_tcp_init", {includes = "uv.h"})) - end) \ No newline at end of file + end)