summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-15 16:11:00 +0800
committerruki <[email protected]>2020-03-15 16:11:00 +0800
commit267907714e29124e5bc292a2aea5afdcd4089fa8 (patch)
tree5ce45cc20240b6e4d536da7cc4b980d5ae056f52
parent946bc0cfb4876a335acd0cedf7d93d325bf4c6cf (diff)
find mingw sdk directory from qt sdk
-rw-r--r--xmake/modules/detect/sdks/find_mingw.lua7
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