From 888d10eed49dd799ba8b1b3c1a73018913cf60ac Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Wed, 23 Sep 2020 20:23:32 +0100 Subject: [PATCH] libuv: fix windows and linux links --- packages/l/libuv/xmake.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/l/libuv/xmake.lua b/packages/l/libuv/xmake.lua index 27ac843ef..f7854af6a 100644 --- a/packages/l/libuv/xmake.lua +++ b/packages/l/libuv/xmake.lua @@ -24,10 +24,14 @@ package("libuv") end on_load("windows", function (package) - package:add("links", "uv_a") + package:add("links", "uv" .. (package:config("shared") and "" or "_a")) package:add("syslinks", "advapi32", "iphlpapi", "psapi", "user32", "userenv", "ws2_32", "kernel32", "gdi32", "winspool", "shell32", "ole32", "oleaut32", "uuid", "comdlg32") end) + if is_plat("linux") then + add_syslinks("pthread") + end + on_install("windows", function (package) import("package.tools.cmake").install(package) os.cp("include", package:installdir()) @@ -39,4 +43,4 @@ package("libuv") on_test(function (package) assert(package:has_cfuncs("uv_tcp_init", {includes = "uv.h"})) - end) + end) \ No newline at end of file