diff options
| author | ruki <[email protected]> | 2025-06-17 22:57:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-06-17 22:57:16 +0800 |
| commit | bcc6904da2585b98cda0f20befba5fa7afba6b16 (patch) | |
| tree | cdb33cb63f9b7360b8be44d5308afb64f6467d06 | |
| parent | f7dd3d77fe79859b94b6f08c901a013c33cf77ba (diff) | |
fix progress path for cmake #6553
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/protobuf/proto.lua | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index e650dd369..5b5513307 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -1220,7 +1220,13 @@ function _get_command_string(cmd, outputdir) elseif kind == "mkdir" then return string.format("${CMAKE_COMMAND} -E make_directory %s", _get_relative_unix_path_to_cmake(cmd.dir, outputdir)) elseif kind == "show" then - return string.format("echo %s", colors.ignore(cmd.showtext)) + local text = colors.ignore(cmd.showtext) + -- we need to translate paths in text + -- https://github.com/xmake-io/xmake/issues/6553 + if is_host("windows") then + text = path.unix(text) + end + return string.format("echo %s", text) end end diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua index 24ad7ed0a..2649a0586 100644 --- a/xmake/rules/protobuf/proto.lua +++ b/xmake/rules/protobuf/proto.lua @@ -156,7 +156,7 @@ function buildcmd_pfile(target, batchcmds, sourcefile_proto, sourcekind, opt) opt.progress, "${color.build.object}compiling.proto.%s %s", (sourcekind == "cxx" and "c++" or "c"), - path(sourcefile_proto) + sourcefile_proto ) batchcmds:vrunv(protoc, protoc_args) |
