improve xmake.lua

This commit is contained in:
ruki
2019-03-19 22:42:29 +08:00
parent e84c9b2972
commit 6bd165d232

View File

@@ -44,6 +44,9 @@ option("luajit")
set_description("Enable the luajit runtime engine.") set_description("Enable the luajit runtime engine.")
option_end() option_end()
-- add repositories
--add_repositories("xmake-repo-dev https://github.com/xmake-io/xmake-repo.git dev")
-- add requires -- add requires
if has_config("luajit") then if has_config("luajit") then
add_requires("luajit") add_requires("luajit")
@@ -51,7 +54,7 @@ else
add_requires("lua") add_requires("lua")
end end
if not is_plat("windows") then if not is_plat("windows") then
add_requires("ncurses", {config = {cflags = "-fPIC"}}) add_requires("ncurses", {configs = {cflags = "-fPIC"}})
end end
-- add target -- add target
@@ -66,6 +69,13 @@ target("test")
-- we need build ltui first -- we need build ltui first
add_deps("ltui") add_deps("ltui")
-- add packages to bind path environments
if has_config("luajit") then
add_packages("luajit")
else
add_packages("lua")
end
-- run tests -- run tests
on_run(function (target) on_run(function (target)