diff options
| author | ruki <[email protected]> | 2024-12-20 10:43:42 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-20 10:43:42 +0800 |
| commit | ca53159567407c93e948c265fa9c36fbcb1752bc (patch) | |
| tree | 3bf4c8a42b9f1a0aae8aa755d744934201a6738a | |
| parent | 2e4a9d342f531b865d1029c03d74b98a2f755661 (diff) | |
| parent | 75c7054aabca8a0e7728643ab92fe5142260edbd (diff) | |
Merge pull request #5988 from 19317362/wps
[fix] error path escape for windows + android ndk --sysroot= c: path…
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 6 |
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 |
