support mingw for libuv

pull/84/head
ruki 4 years ago
parent 307ede256a
commit e306f2d8a2
No known key found for this signature in database
GPG Key ID: 809EF06AD42725BD
  1. 10
      packages/l/libuv/xmake.lua

@ -23,8 +23,10 @@ package("libuv")
add_deps("autoconf", "automake", "libtool", "pkg-config") add_deps("autoconf", "automake", "libtool", "pkg-config")
end end
on_load("windows", function (package) on_load("windows", "mingw@linux,macosx", function (package)
package:add("links", "uv" .. (package:config("shared") and "" or "_a")) 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") package:add("syslinks", "advapi32", "iphlpapi", "psapi", "user32", "userenv", "ws2_32", "kernel32", "gdi32", "winspool", "shell32", "ole32", "oleaut32", "uuid", "comdlg32")
end) end)
@ -37,10 +39,10 @@ package("libuv")
os.cp("include", package:installdir()) os.cp("include", package:installdir())
end) 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"}) import("package.tools.autoconf").install(package, {"--enable-shared=no"})
end) end)
on_test(function (package) on_test(function (package)
assert(package:has_cfuncs("uv_tcp_init", {includes = "uv.h"})) assert(package:has_cfuncs("uv_tcp_init", {includes = "uv.h"}))
end) end)

Loading…
Cancel
Save