summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHapiFive <[email protected]>2024-05-15 09:35:56 +0800
committerHapiFive <[email protected]>2024-05-15 09:35:56 +0800
commit83d6ad82b6fa8f6c46ccaca69ea1903c23e1e66b (patch)
tree503e2224465f16455d8f6b0304353990f96e1ddd
parentad297826da3559b6a034ce339a10807119c2462d (diff)
fix multiple ts files
-rw-r--r--xmake/rules/qt/ts/xmake.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/rules/qt/ts/xmake.lua b/xmake/rules/qt/ts/xmake.lua
index 3677ab9cf..37420eb6b 100644
--- a/xmake/rules/qt/ts/xmake.lua
+++ b/xmake/rules/qt/ts/xmake.lua
@@ -8,7 +8,7 @@ rule("qt.ts")
local sourcefile_ts
for _, sourcebatch in pairs(target:sourcebatches()) do
if sourcebatch.rulename == "qt.ts" then
- sourcefile_ts = sourcebatch.sourcefiles[1]
+ sourcefile_ts = sourcebatch.sourcefiles
else
if sourcebatch.sourcefiles then
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
@@ -36,8 +36,12 @@ rule("qt.ts")
end
assert(os.isexec(lupdate), "lupdate not found!")
assert(os.isexec(lrelease), "lrelease not found!")
- table.join2(lupdate_argv, {"-ts", path(sourcefile_ts)})
- os.vrunv(lupdate, lupdate_argv)
+ for _,tsfile in ipairs(sourcefile_ts) do
+ local tsargv = {}
+ table.join2(tsargv, lupdate_argv)
+ table.join2(tsargv, {"-ts", path(tsfile)})
+ os.vrunv(lupdate, tsargv)
+ end
-- save lrelease
target:data_set("qt.ts.lrelease", lrelease)
end