summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 598a1aad3..22edabcd2 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -104,9 +104,9 @@ end
-- escape path in flag
-- @see https://github.com/xmake-io/xmake/issues/3161
function _escape_path_in_flag(target, flag)
- if is_host("windows") and target:has_tool("cc", "cl") then
- -- e.g. /ManifestInput:xx, /def:xxx
- if flag:find(":", 1, true) then
+ if is_host("windows") then
+ -- e.g. /ManifestInput:..\..\, /def:xxx, -isystem c:\xxx, -Ic:\..
+ if flag:find("\\", 1, true) then
flag = _escape_path(flag)
end
end