summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
Diffstat (limited to 'xmake')
-rw-r--r--xmake/toolchains/mingw/check.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/toolchains/mingw/check.lua b/xmake/toolchains/mingw/check.lua
index 7800315c1..9500341ca 100644
--- a/xmake/toolchains/mingw/check.lua
+++ b/xmake/toolchains/mingw/check.lua
@@ -25,6 +25,17 @@ import("detect.sdks.find_mingw")
-- check the mingw toolchain
function main(toolchain)
local mingw = find_mingw(config.get("mingw"), {verbose = true, bindir = config.get("bin"), cross = config.get("cross")})
+ if not mingw then
+ for _, package in ipairs(toolchain:packages()) do
+ local installdir = package:installdir()
+ if installdir and os.isdir(installdir) then
+ mingw = find_mingw(installdir, {verbose = true, cross = config.get("cross")})
+ if mingw then
+ break
+ end
+ end
+ end
+ end
if mingw then
config.set("mingw", mingw.sdkdir, {force = true, readonly = true})
config.set("cross", mingw.cross, {readonly = true, force = true})