summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2022-01-26 00:06:55 +0800
committerruki <[email protected]>2022-01-26 00:06:55 +0800
commit220a9b2fa6713577395b6dc4b095eacc2537b451 (patch)
tree985f6fefdc313d541d7e6ad3e6788e45a336ce00 /xmake/modules
parent7dc52d8c80a8cb8500fda3d10c7acc30c9105b3c (diff)
add includes to xrepo fetch
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/xrepo/action/fetch.lua8
-rw-r--r--xmake/modules/private/xrepo/action/install.lua6
2 files changed, 9 insertions, 5 deletions
diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua
index 61131863d..9b775337d 100644
--- a/xmake/modules/private/xrepo/action/fetch.lua
+++ b/xmake/modules/private/xrepo/action/fetch.lua
@@ -42,6 +42,9 @@ function menu_options()
" - xrepo fetch --configs=\"regex=true,thread=true\" boost"},
{},
{nil, "toolchain", "kv", nil, "Set the toolchain name." },
+ {nil, "includes", "kv", nil, "Includes extra lua configuration files.",
+ "e.g.",
+ " - xrepo fetch -p cross --toolchain=mytool --includes='toolchain1.lua" .. path.envsep() .. "toolchain2.lua'"},
{nil, "deps", "k", nil, "Fetch packages with dependencies." },
{nil, "cflags", "k", nil, "Fetch cflags of the given packages." },
{nil, "ldflags", "k", nil, "Fetch ldflags of the given packages."},
@@ -118,7 +121,8 @@ function _fetch_packages(packages)
table.insert(config_argv, "-k")
table.insert(config_argv, kind)
end
- os.vrunv("xmake", config_argv)
+ local envs = {XMAKE_RCFILES = option.get("includes")}
+ os.vrunv("xmake", config_argv, {envs = envs})
-- do fetch
local require_argv = {"require", "--fetch"}
@@ -173,7 +177,7 @@ function _fetch_packages(packages)
table.insert(require_argv, "--extra=" .. extra_str)
end
table.join2(require_argv, packages)
- os.vexecv("xmake", require_argv)
+ os.vexecv("xmake", require_argv, {envs = envs})
end
-- main entry
diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua
index e14d6701e..691b3b09c 100644
--- a/xmake/modules/private/xrepo/action/install.lua
+++ b/xmake/modules/private/xrepo/action/install.lua
@@ -40,12 +40,12 @@ function menu_options()
"e.g.",
" - xrepo install -f \"vs_runtime='MD'\" zlib",
" - xrepo install -f \"regex=true,thread=true\" boost"},
- {'j', "jobs", "kv", tostring(os.default_njob()),
+ {'j', "jobs", "kv", tostring(os.default_njob()),
"Set the number of parallel compilation jobs."},
- {nil, "linkjobs", "kv", nil, "Set the number of parallel link jobs."},
+ {nil, "linkjobs", "kv", nil, "Set the number of parallel link jobs."},
{nil, "includes", "kv", nil, "Includes extra lua configuration files.",
"e.g.",
- " -- xrepo install -p cross --toolchain=mytool --includes='toolchain1.lua" .. path.envsep() .. "toolchain2.lua'"},
+ " - xrepo install -p cross --toolchain=mytool --includes='toolchain1.lua" .. path.envsep() .. "toolchain2.lua'"},
{category = "Visual Studio SDK Configuration" },
{nil, "vs", "kv", nil, "The Microsoft Visual Studio"
, " e.g. --vs=2017" },