summaryrefslogtreecommitdiff
path: root/xmake/rules
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-23 22:34:20 +0800
committerruki <[email protected]>2022-02-23 22:34:20 +0800
commit465fee4cbf4b72419c8a717e05a4879e79ac772e (patch)
tree8aeb70c867e09523bc0bc224a8d3c5d154329a81 /xmake/rules
parent3ac95beb688e3b58d1d6b28a15c70b9cf3736e81 (diff)
try fix include for mingw
Diffstat (limited to 'xmake/rules')
-rw-r--r--xmake/rules/qt/load.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua
index 62f795382..e6b555ecf 100644
--- a/xmake/rules/qt/load.lua
+++ b/xmake/rules/qt/load.lua
@@ -304,7 +304,12 @@ function main(target, opt)
target:add("syslinks", "ws2_32", "gdi32", "ole32", "advapi32", "shell32", "user32", "opengl32", "imm32", "winmm", "iphlpapi")
elseif target:is_plat("mingw") then
target:set("frameworks", nil)
- _add_includedirs(target, qt.includedir)
+ -- we need fix it, because gcc maybe does not work on latest mingw when `-isystem D:\a\_temp\msys64\mingw64\include` is passed.
+ -- and qt.includedir will be this path value when Qt sdk directory just is `D:\a\_temp\msys64\mingw64`
+ -- @see https://github.com/msys2/MINGW-packages/issues/10761#issuecomment-1044302523
+ if qt.includedir and os.isdir(qt.includedir) then
+ _add_includedirs(target, qt.includedir)
+ end
_add_includedirs(target, path.join(qt.mkspecsdir, "win32-g++"))
target:add("linkdirs", qt.libdir)
target:add("syslinks", "mingw32", "ws2_32", "gdi32", "ole32", "advapi32", "shell32", "user32", "iphlpapi")