summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-11 00:38:25 +0800
committerruki <[email protected]>2018-09-10 21:50:36 +0800
commita4854beb9512f0fd868dd7bc5c00c4ca236a92f2 (patch)
tree36396d249f0d1fad9316b9378131ebb22013451c /xmake
parente4d6de3fa21809d29484eda04c33985b4b891adb (diff)
add get_config
Diffstat (limited to 'xmake')
-rw-r--r--xmake/core/project/project.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index b60e5f79b..b2bc6deb0 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -108,6 +108,11 @@ function project._api_has_config(interp, ...)
return config.has(...)
end
+-- get config from the given name
+function project._api_get_config(interp, name)
+ return config.get(name)
+end
+
-- add module directories
function project._api_add_moduledirs(interp, ...)
sandbox_module.add_directories(...)
@@ -200,7 +205,8 @@ function project.interpreter()
, {"is_plat", project._api_is_plat }
, {"is_arch", project._api_is_arch }
, {"is_config", project._api_is_config }
- , {"has_config", project._api_has_config }
+ , {"get_config", project._api_get_config }
+ , {"has_config", project._api_has_config }
-- add_xxx
, {"add_moduledirs", project._api_add_moduledirs }
, {"add_plugindirs", project._api_add_plugindirs }