|
@@ -6,7 +6,8 @@ package("lua")
|
|
|
set_urls("https://www.lua.org/ftp/lua-$(version).tar.gz",
|
|
|
"https://github.com/lua/lua.git")
|
|
|
|
|
|
- add_versions("5.3.5", "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac")
|
|
|
+ add_versions("5.4.1", "4ba786c3705eb9db6567af29c91a01b81f1c0ac3124fdbf6cd94bdd9e53cca7d")
|
|
|
+ add_versions("5.3.6", "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60")
|
|
|
add_versions("5.2.4", "b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b")
|
|
|
add_versions("5.1.5", "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333")
|
|
|
|
|
@@ -34,8 +35,10 @@ package("lua")
|
|
|
add_defines("LUA_USE_MACOSX")
|
|
|
add_defines("LUA_DL_DYLD")
|
|
|
elseif is_plat("windows") then
|
|
|
- add_defines("LUA_USE_WINDOWS")
|
|
|
- add_defines("LUA_DL_DLL")
|
|
|
+ -- Lua already detects Windows and sets according defines
|
|
|
+ if is_kind("shared") then
|
|
|
+ add_defines("LUA_BUILD_AS_DLL", {public = true})
|
|
|
+ end
|
|
|
end
|
|
|
|
|
|
target("lua")
|
|
@@ -47,7 +50,13 @@ package("lua")
|
|
|
add_syslinks("dl")
|
|
|
end
|
|
|
]], package:config("shared") and "shared" or "static", is_plat(os.host()) and "true" or "false"))
|
|
|
- import("package.tools.xmake").install(package)
|
|
|
+
|
|
|
+ local configs = {}
|
|
|
+ if package:config("shared") then
|
|
|
+ configs.kind = "shared"
|
|
|
+ end
|
|
|
+
|
|
|
+ import("package.tools.xmake").install(package, configs)
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|