diff options
| author | ruki <[email protected]> | 2022-08-20 20:58:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-20 21:00:58 +0800 |
| commit | 82c2ee867dc33097800caa4d25ab44aa1696517b (patch) | |
| tree | bbffd0f62ebe60f9fc711b583e470b9b34aeec67 /xmake/modules/detect | |
| parent | 432e9cc7745628d3b8bffa6c927ad4f23443249b (diff) | |
use catalyst for macosx
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/sdks/find_xcode.lua | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/xmake/modules/detect/sdks/find_xcode.lua b/xmake/modules/detect/sdks/find_xcode.lua index ed4412420..80f3daead 100644 --- a/xmake/modules/detect/sdks/find_xcode.lua +++ b/xmake/modules/detect/sdks/find_xcode.lua @@ -41,7 +41,7 @@ function _find_xcode_sdkver(sdkdir, opt) local plat = opt.plat local arch = opt.arch local platsdkdir = nil - if plat == "iphoneos" and opt.appledev ~= "catalyst" then + if plat == "iphoneos" then if arch == "i386" or arch == "x86_64" then platsdkdir = "Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.*.sdk" else @@ -76,16 +76,20 @@ end function _find_target_minver(sdkdir, sdkver, opt) opt = opt or {} local target_minver = sdkver - if opt.plat == "macosx" and opt.appledev ~= "catalyst" then - local macos_ver = macos.version() - if macos_ver then - target_minver = macos_ver:major() .. "." .. macos_ver:minor() - end - elseif opt.plat == "iphoneos" and opt.appledev == "catalyst" then - local platsdkdir = "Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk" - local dir = find_directory(platsdkdir, sdkdir) - if dir then - target_minver = dir:match("%d+%.%d+") + if opt.plat == "macosx" then + if opt.appledev == "catalyst" then + local platsdkdir = "Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk" + local dir = find_directory(platsdkdir, sdkdir) + if dir then + target_minver = dir:match("%d+%.%d+") + else + target_minver = "13.1" + end + else + local macos_ver = macos.version() + if macos_ver then + target_minver = macos_ver:major() .. "." .. macos_ver:minor() + end end end return target_minver |
