diff options
| author | ruki <[email protected]> | 2025-04-05 22:32:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-05 22:33:12 +0800 |
| commit | a201afae4ca719b3a13743eb42c2f348a858c697 (patch) | |
| tree | 1c6db352638487b8723e3d41aff8a3e790aed794 | |
| parent | b64c409c2de0663057d1a5661c3a5cef664bbabf (diff) | |
improve xrepo fetch for android #6276
| -rw-r--r-- | xmake/modules/private/xrepo/action/fetch.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua index 0cf83ae09..d8f727716 100644 --- a/xmake/modules/private/xrepo/action/fetch.lua +++ b/xmake/modules/private/xrepo/action/fetch.lua @@ -31,20 +31,23 @@ function menu_options() local options = { {'k', "kind", "kv", nil, "Enable static/shared library.", - values = {"static", "shared"}}, + values = {"static", "shared" }}, {'p', "plat", "kv", nil, "Set the given platform." }, {'a', "arch", "kv", nil, "Set the given architecture." }, {'m', "mode", "kv", nil, "Set the given mode.", - values = {"release", "debug"}}, + values = {"release", "debug" }}, {'f', "configs", "kv", nil, "Set the given extra package configs.", "e.g.", " - xrepo fetch --configs=\"runtimes='MD'\" zlib", " - xrepo fetch --configs=\"regex=true,thread=true\" boost" }, {nil, "system", "k", "false", "Only fetch package on current system." }, - { }, + {category = "Android NDK Configuration" }, + {nil, "ndk", "kv", nil, "The NDK directory" }, + {category = "Cross Compilation Configuration" }, {nil, "sdk", "kv", nil, "Set the SDK directory of cross toolchain." }, {nil, "toolchain", "kv", nil, "Set the toolchain name." }, {nil, "toolchain_host", "kv", nil, "Set the host toolchain name." }, + {category = "Other Configuration" }, {nil, "includes", "kv", nil, "Includes extra lua configuration files.", "e.g.", " - xrepo fetch -p cross --toolchain=mytool --includes='toolchain1.lua" .. path.envsep() .. "toolchain2.lua'" }, @@ -139,6 +142,10 @@ function _fetch_packages(packages) table.insert(config_argv, "-a") table.insert(config_argv, option.get("arch")) end + -- for android + if option.get("ndk") then + table.insert(config_argv, "--ndk=" .. option.get("ndk")) + end -- for cross toolchain if option.get("sdk") then table.insert(config_argv, "--sdk=" .. option.get("sdk")) |
