diff options
| author | ruki <[email protected]> | 2022-03-26 16:18:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-26 16:18:10 +0800 |
| commit | 8e9f4bac621c3158b3c82ec9fe149b54a1f644a2 (patch) | |
| tree | 43ba3743de8ce7ad122269e73e9c52464947a9c4 | |
| parent | ac16d2aa9c2c84009cc55a4b27fbbc70fd398c1b (diff) | |
add --appledev for xrepo
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/private/xrepo/action/install.lua | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index 53f977911..a0934db1e 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -52,8 +52,12 @@ function _get_configs(package, configs) if vs_runtime then table.insert(configs, "--vs_runtime=" .. vs_runtime) end - end - if package:is_plat("cross") then + elseif package:is_plat("iphoneos", "watchos", "appletvos") then + local appledev = package:config("appledev") + if appledev then + table.insert(configs, "--appledev=" .. appledev) + end + elseif package:is_plat("cross") then local cross = _get_config_from_toolchains(package, "cross") or get_config("cross") if cross then table.insert(configs, "--cross=" .. cross) diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index a4e4f7551..bd77e7b00 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -64,6 +64,7 @@ function menu_options() {nil, "xcode", "kv", nil, "The Xcode Application Directory" }, {nil, "xcode_sdkver", "kv", nil, "The SDK Version for Xcode" }, {nil, "target_minver", "kv", nil, "The Target Minimal Version" }, + {nil, "appledev", "kv", nil, "The Apple Device Type" }, {category = "Other Configuration" }, {nil, "force", "k", nil, "Force to reinstall all package dependencies."}, {nil, "shallow", "k", nil, "Does not install dependent packages."}, @@ -200,6 +201,9 @@ function _install_packages(packages) if option.get("target_minver") then table.insert(config_argv, "--target_minver=" .. option.get("target_minver")) end + if option.get("appledev") then + table.insert(config_argv, "--appledev=" .. option.get("appledev")) + end local envs = {} if #rcfiles > 0 then envs.XMAKE_RCFILES = path.joinenv(rcfiles) |
