6 set_values("lua5.4", "lua5.3", "lua5.2", "lua5.1", "luajit")
7 set_description("Enable/Disable Lua")
10 if has_config("liba-lua") then
11 add_requires(get_config("liba-lua"))
15 add_defines("A_EXPORTS")
16 on_load(function(target
)
17 local version
= target
:pkg(get_config("liba-lua")):version()
18 if version
:major() >= 5 then
19 version
= version
:major() .. "." .. version
:minor()
23 target
:set("VERSION", version
)
24 target
:set("targetdir", path
.join(target
:targetdir(), "lua" .. version
))
26 on_install(function(target
)
27 local installdir
= target
:installdir()
29 local version
= target
:get("VERSION")
30 print("installing %s to %s ..", target
:name(), installdir
)
31 installdir
= path
.join(installdir
, "lib", "lua", version
)
33 os
.vcp(target
:targetfile(), installdir
)
36 add_packages(get_config("liba-lua"))
37 if is_plat("windows", "mingw") then
38 set_filename("liba.dll")
40 set_filename("liba.so")