From 267907714e29124e5bc292a2aea5afdcd4089fa8 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 15 Mar 2020 16:11:00 +0800 Subject: find mingw sdk directory from qt sdk --- xmake/modules/detect/sdks/find_mingw.lua | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.3.1