improve xmake.lua
This commit is contained in:
12
xmake.lua
12
xmake.lua
@@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user