summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-25 22:53:17 +0800
committerruki <[email protected]>2023-09-25 22:53:17 +0800
commit142ffc812dc030dac126e91df987a7f6a14cea40 (patch)
treed853ea89d9adac510b6ab9b8206f20dee9cfd386
parent07e5852838b03a36faa27f99c6f148a8daeb9f4c (diff)
improve to find xcode sdk version
-rw-r--r--xmake/modules/detect/sdks/find_xcode.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_xcode.lua b/xmake/modules/detect/sdks/find_xcode.lua
index dff7e56cd..1eaa11de2 100644
--- a/xmake/modules/detect/sdks/find_xcode.lua
+++ b/xmake/modules/detect/sdks/find_xcode.lua
@@ -67,7 +67,8 @@ function _find_xcode_sdkver(sdkdir, opt)
if platsdkdir then
local dir = find_directory(platsdkdir, sdkdir)
if dir then
- return dir:match("%d+%.%d+")
+ local basename = path.basename(dir)
+ return basename:match("%d+%.%d+")
end
end
end