summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua8
-rw-r--r--xmake/rules/protobuf/proto.lua2
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)