|
@@ -19,7 +19,7 @@ package("lua")
|
|
package:addenv("PATH", "bin")
|
|
package:addenv("PATH", "bin")
|
|
end)
|
|
end)
|
|
|
|
|
|
- on_install("linux", "macosx", "windows", function (package)
|
|
|
|
|
|
+ on_install("linux", "macosx", "windows", "android", function (package)
|
|
io.writefile("xmake.lua", [[
|
|
io.writefile("xmake.lua", [[
|
|
target("lualib")
|
|
target("lualib")
|
|
set_kind("static")
|
|
set_kind("static")
|
|
@@ -29,6 +29,10 @@ package("lua")
|
|
add_defines("LUA_COMPAT_5_2", "LUA_COMPAT_5_1")
|
|
add_defines("LUA_COMPAT_5_2", "LUA_COMPAT_5_1")
|
|
if is_plat("linux") then
|
|
if is_plat("linux") then
|
|
add_defines("LUA_USE_LINUX")
|
|
add_defines("LUA_USE_LINUX")
|
|
|
|
+ elseif is_plat("macosx") then
|
|
|
|
+ add_defines("LUA_USE_MACOSX")
|
|
|
|
+ elseif is_plat("windows") then
|
|
|
|
+ add_defines("LUA_USE_WINDOWS")
|
|
end
|
|
end
|
|
|
|
|
|
target("lua")
|
|
target("lua")
|
|
@@ -43,6 +47,8 @@ package("lua")
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|
|
- os.vrun("lua -e \"print('hello xmake!')\"")
|
|
|
|
|
|
+ if is_plat(os.host()) then
|
|
|
|
+ os.vrun("lua -e \"print('hello xmake!')\"")
|
|
|
|
+ end
|
|
assert(package:has_cfuncs("lua_getinfo", {includes = "lua.h"}))
|
|
assert(package:has_cfuncs("lua_getinfo", {includes = "lua.h"}))
|
|
end)
|
|
end)
|