summaryrefslogtreecommitdiff
path: root/xmake/rules/xcode/xcassets/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/xcode/xcassets/xmake.lua')
-rw-r--r--xmake/rules/xcode/xcassets/xmake.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/xmake/rules/xcode/xcassets/xmake.lua b/xmake/rules/xcode/xcassets/xmake.lua
index 5c1912dd4..d20fc278c 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")
@@ -85,7 +88,7 @@ rule("xcode.xcassets")
end
table.insert(argv, "--app-icon")
table.insert(argv, "AppIcon")
- if is_plat("iphoneos") then
+ if target:is_plat("iphoneos") then
table.insert(argv, "--enable-on-demand-resources")
table.insert(argv, "YES")
table.insert(argv, "--compress-pngs")