summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwps <[email protected]>2024-12-19 17:44:32 +0800
committerwps <[email protected]>2024-12-19 17:44:32 +0800
commit58c774526e620fbee7d3e7bf6172bdcbe3aa6256 (patch)
tree9dc2167c8b777ec2cc9242bc39675d92c8e9b937
parentbd435f07c33dc69ebe90c9a6b8ff54ef4518642f (diff)
[fix] error path escape for windows + android ndk --sysroot= c: path/to/ndk and -isystem c: path/to/ndk
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 598a1aad3..5135d7585 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -104,7 +104,10 @@ 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
+
+ if is_host("windows") and (target:has_tool("cc", "cl")
+ or target:is_plat("android") -- e.g. -isystem\ c:/path/to/ndk/28.0.12674087/
+ ) then
-- e.g. /ManifestInput:xx, /def:xxx
if flag:find(":", 1, true) then
flag = _escape_path(flag)