summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-22 12:15:22 +0800
committerruki <[email protected]>2022-05-22 12:15:44 +0800
commit489e4c01e2c4fb443c250e9ac9ec39b6bfcc129f (patch)
tree5c1404ce5d6dba180808b78ff3d3e353c65963bb
parent9d7ff9055927118fab28537d204d4bb331842826 (diff)
improve bin2c path
-rw-r--r--xmake/modules/private/utils/batchcmds.lua4
-rw-r--r--xmake/rules/utils/bin2c/xmake.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/private/utils/batchcmds.lua b/xmake/modules/private/utils/batchcmds.lua
index 8a31f7afd..10b037f4e 100644
--- a/xmake/modules/private/utils/batchcmds.lua
+++ b/xmake/modules/private/utils/batchcmds.lua
@@ -222,7 +222,7 @@ function batchcmds:compile(sourcefiles, objectfile, opt)
opt = opt or {}
opt.target = self._TARGET
- -- wrap path for sourcefiles
+ -- wrap path for sourcefiles, because we need translate path for project generator
if type(sourcefiles) == "table" then
local sourcefiles_wrap = {}
for _, sourcefile in ipairs(sourcefiles) do
@@ -254,7 +254,7 @@ function batchcmds:link(objectfiles, targetfile, opt)
opt = opt or {}
opt.target = target
- -- wrap path for objectfiles
+ -- wrap path for objectfiles, because we need translate path for project generator
local objectfiles_wrap = {}
for _, objectfile in ipairs(objectfiles) do
table.insert(objectfiles_wrap, path(objectfile))
diff --git a/xmake/rules/utils/bin2c/xmake.lua b/xmake/rules/utils/bin2c/xmake.lua
index 77f81125c..3e5e9144d 100644
--- a/xmake/rules/utils/bin2c/xmake.lua
+++ b/xmake/rules/utils/bin2c/xmake.lua
@@ -37,7 +37,7 @@ rule("utils.bin2c")
-- add commands
batchcmds:show_progress(opt.progress, "${color.build.object}generating.bin2c %s", sourcefile_bin)
batchcmds:mkdir(headerdir)
- local argv = {"lua", "private.utils.bin2c", "-i", sourcefile_bin, "-o", headerfile}
+ local argv = {"lua", "private.utils.bin2c", "-i", path(sourcefile_bin), "-o", path(headerfile)}
local linewidth = target:extraconf("rules", "utils.bin2c", "linewidth")
if linewidth then
table.insert(argv, "-w")