diff options
| author | ruki <[email protected]> | 2018-12-19 00:45:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-12-18 22:31:48 +0800 |
| commit | 998aedba0b07b6b7605272b99e6dc0d59e5c8ac6 (patch) | |
| tree | 63330656edef5dd218adb40e4ed2d0c303fcefb3 | |
| parent | c3d983ef336403e8fe2ad0d29e2e3073e733a93e (diff) | |
add sdk directory for mingw
| -rw-r--r-- | xmake/platforms/mingw/check.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/platforms/mingw/check.lua b/xmake/platforms/mingw/check.lua index 085d207ea..dfb9fe5d9 100644 --- a/xmake/platforms/mingw/check.lua +++ b/xmake/platforms/mingw/check.lua @@ -40,9 +40,15 @@ function _toolchains(config) arch = "i686" end + -- get sdk directory, TODO add detect.sdks.find_mingw + local sdk = config.get("sdk") + if os.host() == "macosx" and not sdk then + sdk = "/usr/local/opt/mingw-w64" + end + -- find cross toolchain local cross = "" - local toolchain = find_cross_toolchain(config.get("sdk") or config.get("bin"), {bin = config.get("bin"), cross = config.get("cross")}) + local toolchain = find_cross_toolchain(sdk or config.get("bin"), {bin = config.get("bin"), cross = config.get("cross")}) if toolchain then -- save toolchain |
