diff options
| author | ruki <[email protected]> | 2020-04-07 00:41:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-06 22:07:28 +0800 |
| commit | e39f9aa0eb208e74c827bbae1bc20fba9fbb01d7 (patch) | |
| tree | 0f9a359596b585481064ac3538378af1e0c152de /xmake/modules | |
| parent | d863b9657d7c93247a242a7ae9e2138916f08d7a (diff) | |
improve codesign config
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/detect/sdks/find_xcode.lua | 23 | ||||
| -rw-r--r-- | xmake/modules/private/tools/codesign.lua | 2 |
2 files changed, 17 insertions, 8 deletions
diff --git a/xmake/modules/detect/sdks/find_xcode.lua b/xmake/modules/detect/sdks/find_xcode.lua index 6385a4929..429fdfc8a 100644 --- a/xmake/modules/detect/sdks/find_xcode.lua +++ b/xmake/modules/detect/sdks/find_xcode.lua @@ -80,12 +80,17 @@ function _find_xcode(sdkdir, xcode_sdkver, plat, arch) end -- find codesign identity - local codesign_identity = nil - local codesign_identities = codesign.codesign_identities() - if codesign_identities then - for identity, _ in pairs(codesign_identities) do - codesign_identity = identity - break + local codesign_identity = config.get("xcode_codesign_identity") + if codesign_identity == nil then -- we will disable codesign_identity if be false + codesign_identity = global.get("xcode_codesign_identity") + end + if codesign_identity == nil then + local codesign_identities = codesign.codesign_identities() + if codesign_identities then + for identity, _ in pairs(codesign_identities) do + codesign_identity = identity + break + end end end @@ -136,7 +141,11 @@ function main(sdkdir, opt) if opt.verbose or option.get("verbose") then cprint("checking for the Xcode directory ... ${color.success}%s", xcode.sdkdir) cprint("checking for the SDK version of Xcode ... ${color.success}%s", xcode.sdkver) - cprint("checking for the Codesign Identity of Xcode ... ${color.success}%s", xcode.codesign_identity) + if xcode.codesign_identity then + cprint("checking for the Codesign Identity of Xcode ... ${color.success}%s", xcode.codesign_identity) + else + cprint("checking for the Codesign Identity of Xcode ... ${color.nothing}${text.nothing}") + end end else diff --git a/xmake/modules/private/tools/codesign.lua b/xmake/modules/private/tools/codesign.lua index 8bdeabcac..1517c72b0 100644 --- a/xmake/modules/private/tools/codesign.lua +++ b/xmake/modules/private/tools/codesign.lua @@ -67,7 +67,7 @@ function main (programdir, codesign_identity) -- get codesign local sign = "-" - if codesign_identity then + if codesign_identity then -- we will uses sign/'-' if be false for `xmake f --xcode_codesign_identity=n` local identities = codesign_identities() if identities then sign = identities[codesign_identity] |
