summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_mingw.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua
index 69b6a1df9..4085a6cb8 100644
--- a/xmake/modules/detect/sdks/find_mingw.lua
+++ b/xmake/modules/detect/sdks/find_mingw.lua
@@ -34,7 +34,11 @@ function _find_mingwdir(sdkdir)
if is_host("macosx", "linux") and os.isdir("/opt/llvm-mingw") then
sdkdir = "/opt/llvm-mingw"
elseif is_host("macosx") and os.isdir("/usr/local/opt/mingw-w64") then
+ -- for macOS Intel
sdkdir = "/usr/local/opt/mingw-w64"
+ elseif is_host("macosx") and os.isdir("/opt/homebrew/opt/mingw-w64") then
+ -- for Apple Silicon
+ sdkdir = "/opt/homebrew/opt/mingw-w64"
elseif is_host("linux") then
sdkdir = "/usr"
elseif is_subhost("msys") then