summaryrefslogtreecommitdiff
path: root/xmake/toolchains/xcode/check.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-17 00:40:44 +0800
committerruki <[email protected]>2020-12-17 00:40:44 +0800
commit8e149f26ccfc93a756074915b5d5f052ba73ed85 (patch)
treed2e6d0b509ba4650fb70c9174f358117f3806664 /xmake/toolchains/xcode/check.lua
parent98bdd72d370d044081667a325c27138b2d61892a (diff)
improve to check xcode
Diffstat (limited to 'xmake/toolchains/xcode/check.lua')
-rw-r--r--xmake/toolchains/xcode/check.lua32
1 files changed, 27 insertions, 5 deletions
diff --git a/xmake/toolchains/xcode/check.lua b/xmake/toolchains/xcode/check.lua
index d7412e798..b8707a2a9 100644
--- a/xmake/toolchains/xcode/check.lua
+++ b/xmake/toolchains/xcode/check.lua
@@ -28,17 +28,37 @@ function main(toolchain)
-- find xcode
local xcode_sdkver = toolchain:config("xcode_sdkver") or config.get("xcode_sdkver")
- local xcode = find_xcode(config.get("xcode"), {force = true, verbose = toolchain:global(),
+ local xcode = find_xcode(config.get("xcode"), {force = true, verbose = true,
+ find_codesign = toolchain:global(),
sdkver = xcode_sdkver,
plat = toolchain:plat(),
arch = toolchain:arch()})
- if xcode then
- xcode_sdkver = xcode.sdkver
- config.set("xcode", xcode.sdkdir, {force = true, readonly = true})
- else
+ if not xcode then
+ cprint("checking for Xcode directory ... ${color.nothing}${text.nothing}")
return false
end
+ -- xcode found
+ xcode_sdkver = xcode.sdkver
+ if toolchain:global() then
+ config.set("xcode", xcode.sdkdir, {force = true, readonly = true})
+ config.set("xcode_mobile_provision", xcode.mobile_provision, {force = true, readonly = true})
+ config.set("xcode_codesign_identity", xcode.codesign_identity, {force = true, readonly = true})
+ cprint("checking for Xcode directory ... ${color.success}%s", xcode.sdkdir)
+ if xcode.codesign_identity then
+ cprint("checking for Codesign Identity of Xcode ... ${color.success}%s", xcode.codesign_identity)
+ else
+ cprint("checking for Codesign Identity of Xcode ... ${color.nothing}${text.nothing}")
+ end
+ if toolchain:is_plat("iphoneos") then
+ if xcode.mobile_provision then
+ cprint("checking for Mobile Provision of Xcode ... ${color.success}%s", xcode.mobile_provision)
+ else
+ cprint("checking for Mobile Provision of Xcode ... ${color.nothing}${text.nothing}")
+ end
+ end
+ end
+
-- save target minver
--
-- @note we need to differentiate the version for the system,
@@ -62,5 +82,7 @@ function main(toolchain)
toolchain:config_set("xcode_sdkver", xcode_sdkver)
toolchain:config_set("target_minver", target_minver)
toolchain:configs_save()
+ cprint("checking for SDK version of Xcode for %s (%s) ... ${color.success}%s", toolchain:plat(), toolchain:arch(), xcode_sdkver)
+ cprint("checking for Minimal target version of Xcode for %s (%s) ... ${color.success}%s", toolchain:plat(), toolchain:arch(), target_minver)
return true
end