Fix xmake for msys2
This commit is contained in:
parent
bff356f7df
commit
103421e89a
|
|
@ -210,10 +210,7 @@ elseif is_plat("mingw") then
|
||||||
add_ldflags("-Wa,-mbig-obj")
|
add_ldflags("-Wa,-mbig-obj")
|
||||||
|
|
||||||
if is_subhost("msys", "cygwin") then
|
if is_subhost("msys", "cygwin") then
|
||||||
-- disable -isystem for packages as it's broken on msys2 (see https://github.com/msys2/MINGW-packages/issues/10761)
|
add_rules("msys2.isystem.fix")
|
||||||
if project.policy("package.include_external_headers") == nil then
|
|
||||||
set_policy("package.include_external_headers", false)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
rule("msys2.isystem.fix")
|
||||||
|
on_load(function (target)
|
||||||
|
import("core.project.project")
|
||||||
|
|
||||||
|
local external = project.policy("package.include_external_headers")
|
||||||
|
if external == nil then
|
||||||
|
external = target:policy("package.include_external_headers")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- disable -isystem for packages as it seems broken on msys2 (see https://github.com/msys2/MINGW-packages/issues/10761)
|
||||||
|
if external == nil then
|
||||||
|
target:set("policy", "package.include_external_headers", false)
|
||||||
|
end
|
||||||
|
end)
|
||||||
Loading…
Reference in New Issue