From ea1f3a95adba361e27d387f0b5227cd4ce458440 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 30 Aug 2023 00:18:43 +0800 Subject: fix include dep path #4134 --- xmake/modules/private/tools/gcc/parse_deps.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmake/modules/private/tools/gcc/parse_deps.lua b/xmake/modules/private/tools/gcc/parse_deps.lua index 24ff67f09..d46b5538b 100644 --- a/xmake/modules/private/tools/gcc/parse_deps.lua +++ b/xmake/modules/private/tools/gcc/parse_deps.lua @@ -27,6 +27,9 @@ local space_placeholder = "\001" -- normailize path of a dependecy function _normailize_dep(dep, projectdir) + -- escape characters, e.g. \#Qt.Widget_pch.h -> #Qt.Widget_pch.h + -- @see https://github.com/xmake-io/xmake/issues/4134 + dep = dep:gsub("\\(.)", "%1") if path.is_absolute(dep) then dep = path.translate(dep) else -- cgit v1.3.1