From edfbe8654b25fa4ac5455f7dfc2c4a49de8dd121 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 20 May 2020 22:44:51 +0800 Subject: support mingw for linux --- xmake/modules/detect/sdks/find_mingw.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 06723859c..6aa5e3f2a 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -33,6 +33,8 @@ function _find_mingwdir(sdkdir) if not sdkdir then if is_host("macosx") then sdkdir = "/usr/local/opt/mingw-w64" + elseif is_host("linux") then + sdkdir = "/usr" end end @@ -58,7 +60,7 @@ function _find_mingw(sdkdir, bindir, cross) end -- select cross on macos, e.g x86_64-w64-mingw32- or i686-w64-mingw32- - if is_host("macosx") and not cross then + if is_host("macosx", "linux") and not cross then local arch = config.get("arch") if not arch or arch == "i386" then cross = "i686-*-" -- cgit v1.3.1