Skip to content

Commit

Permalink
Update find_mingw.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
c8ef authored Apr 27, 2024
1 parent 57a632a commit eeeb76b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions xmake/modules/detect/sdks/find_mingw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@ import("detect.sdks.find_cross_toolchain")

-- find mingw directory
function _find_mingwdir(sdkdir)
cprint("_find_mingwdir #1 %s", sdkdir)
-- get mingw directory
if not sdkdir then
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"
cprint("_find_mingwdir #2 %s", sdkdir)
elseif is_host("macosx") and os.isdir("/opt/homebrew/opt/mingw-w64") then
-- for Apple Silicon
sdkdir = "/opt/homebrew/opt/mingw-w64"
cprint("_find_mingwdir #2 %s", sdkdir)
elseif is_host("linux") then
sdkdir = "/usr"
elseif is_subhost("msys") then
Expand Down Expand Up @@ -82,7 +81,6 @@ function _find_mingw(sdkdir, bindir, cross)

-- find mingw root directory
sdkdir = _find_mingwdir(sdkdir)
cprint("_find_mingw #1 %s", sdkdir)
if not sdkdir then
return
end
Expand Down

0 comments on commit eeeb76b

Please sign in to comment.