From 994ebd869a8f921eb92b1c49e115a8568414c73f Mon Sep 17 00:00:00 2001 From: Lynix Date: Tue, 19 Jul 2022 19:03:47 +0200 Subject: [PATCH] Disable -isystem with MinGW on msys2 See https://github.com/msys2/MINGW-packages/issues/10761 --- .github/workflows/msys2-build.yml | 2 +- xmake.lua | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/msys2-build.yml b/.github/workflows/msys2-build.yml index fa77b0982..9772af00f 100644 --- a/.github/workflows/msys2-build.yml +++ b/.github/workflows/msys2-build.yml @@ -92,7 +92,7 @@ jobs: # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies - run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes --verbose + run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes # Build the engine - name: Build Nazara diff --git a/xmake.lua b/xmake.lua index 027e95884..5b27e3e72 100644 --- a/xmake.lua +++ b/xmake.lua @@ -208,6 +208,13 @@ if is_plat("windows") then elseif is_plat("mingw") then add_cxflags("-Og", "-Wa,-mbig-obj") add_ldflags("-Wa,-mbig-obj") + + 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) + if project.policy("package.include_external_headers") == nil then + set_policy("package.include_external_headers", false) + end + end end for name, module in pairs(modules) do