From 5759db1efe705d2aaaf2ce62a8cc93bd8aa02e52 Mon Sep 17 00:00:00 2001 From: star9029 Date: Thu, 13 Feb 2025 11:55:02 +0800 Subject: Remove msystem include on msys2 --- xmake/modules/package/manager/pacman/find_package.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmake/modules/package/manager/pacman/find_package.lua b/xmake/modules/package/manager/pacman/find_package.lua index d939192ec..961a4b85e 100644 --- a/xmake/modules/package/manager/pacman/find_package.lua +++ b/xmake/modules/package/manager/pacman/find_package.lua @@ -48,10 +48,11 @@ function _find_package_from_list(list, name, pacman, opt) -- iterate over each file path inside the pacman package local result = {} + local msystem_include = msystem and "/" .. msystem .. "/include/" or "" for _, line in ipairs(list:split('\n', {plain = true})) do -- on msys cygpath should be used to convert local path to windows path line = line:trim():split('%s+')[2] if line:find("/include/", 1, true) and (line:endswith(".h") or line:endswith(".hpp")) then - if not line:startswith("/usr/include/") then + if not line:startswith("/usr/include/") and not line:startswith(msystem_include) then result.includedirs = result.includedirs or {} local hpath = line if is_subhost("msys") and opt.plat == "mingw" then -- cgit v1.3.1