diff options
| -rw-r--r-- | xmake/modules/detect/sdks/find_mingw.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 2c6cc6400..f6474536e 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -20,6 +20,7 @@ -- imports import("lib.detect.cache") +import("lib.detect.find_path") import("core.base.option") import("core.base.global") import("core.project.config") @@ -35,6 +36,12 @@ function _find_mingwdir(sdkdir) end end + -- attempt to find mingw directory from the qt sdk + local qt = config.get("qt") + if not sdkdir or qt then + sdkdir = find_path("bin", path.join(qt, "Tools", "mingw*_" .. (is_arch("x86_64") and "64" or "32"))) + end + -- get mingw directory if sdkdir and os.isdir(sdkdir) then return sdkdir |
