Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add qt ts files building #5103

Merged
merged 12 commits into from
May 15, 2024
10 changes: 7 additions & 3 deletions xmake/rules/qt/ts/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1143910315 marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down