summaryrefslogtreecommitdiff
path: root/xmake/rules/xcode/xcassets
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-16 00:45:51 +0800
committerruki <[email protected]>2020-12-16 00:45:51 +0800
commitb3d4c235f88fb14f0aa42c2704727a104ab33fd2 (patch)
tree16583126000d6b88da0b1eaf1294a4aba692f72f /xmake/rules/xcode/xcassets
parentdcdd8e5712a863fe225539a09671a7a6a73d60b6 (diff)
improve toolchain for xcode
Diffstat (limited to 'xmake/rules/xcode/xcassets')
-rw-r--r--xmake/rules/xcode/xcassets/xmake.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/xmake/rules/xcode/xcassets/xmake.lua b/xmake/rules/xcode/xcassets/xmake.lua
index 5c1912dd4..31c26a56d 100644
--- a/xmake/rules/xcode/xcassets/xmake.lua
+++ b/xmake/rules/xcode/xcassets/xmake.lua
@@ -31,6 +31,7 @@ rule("xcode.xcassets")
import("core.base.option")
import("core.theme.theme")
import("core.project.depend")
+ import("core.tool.toolchain")
import("private.utils.progress")
-- get xcode sdk directory
@@ -60,16 +61,18 @@ rule("xcode.xcassets")
io.writefile(assetcatalog_generated_info_plist, "")
-- do compile
- local target_minver
+ local target_minver = nil
+ local toolchain_xcode = toolchain.load("xcode", {plat = target:plat(), arch = target:arch()})
+ if toolchain_xcode then
+ target_minver = toolchain_xcode:config("target_minver")
+ end
local argv = {"--warnings", "--notices", "--output-format", "human-readable-text"}
- if is_plat("macosx") then
- target_minver = get_config("target_minver_macosx")
+ if target:is_plat("macosx") then
table.insert(argv, "--target-device")
table.insert(argv, "mac")
table.insert(argv, "--platform")
table.insert(argv, "macosx")
- elseif is_plat("iphoneos") then
- target_minver = get_config("target_minver_iphoneos")
+ elseif target:is_plat("iphoneos") then
table.insert(argv, "--target-device")
table.insert(argv, "iphone")
table.insert(argv, "--target-device")