From 6bd165d2322cd7ef7ec4e85082fc0a85668c5a95 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 19 Mar 2019 22:42:29 +0800 Subject: [PATCH] improve xmake.lua --- xmake.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xmake.lua b/xmake.lua index ba6bac5..4766ae4 100644 --- a/xmake.lua +++ b/xmake.lua @@ -44,6 +44,9 @@ option("luajit") set_description("Enable the luajit runtime engine.") option_end() +-- add repositories +--add_repositories("xmake-repo-dev https://github.com/xmake-io/xmake-repo.git dev") + -- add requires if has_config("luajit") then add_requires("luajit") @@ -51,7 +54,7 @@ else add_requires("lua") end if not is_plat("windows") then - add_requires("ncurses", {config = {cflags = "-fPIC"}}) + add_requires("ncurses", {configs = {cflags = "-fPIC"}}) end -- add target @@ -66,6 +69,13 @@ target("test") -- we need build ltui first add_deps("ltui") + -- add packages to bind path environments + if has_config("luajit") then + add_packages("luajit") + else + add_packages("lua") + end + -- run tests on_run(function (target)