Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi authored Jul 3, 2024
1 parent 66a184f commit 7b5299b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xmake/rules/qt/ts/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ rule("qt.ts")
-- get lrelease
local lrelease = target:data("qt.ts.lrelease")
local outputdir = target:targetdir()
if target:fileconfig(sourcefile_ts) and target:fileconfig(sourcefile_ts).prefixdir then
outputdir = path.join(target:targetdir(), target:fileconfig(sourcefile_ts).prefixdir)
local fileconfig = target:fileconfig(sourcefile_ts)
if fileconfig and fileconfig.prefixdir then
outputdir = path.join(target:targetdir(), fileconfig.prefixdir)
end
local outfile = path.join(outputdir, path.basename(sourcefile_ts) .. ".qm")
batchcmds:mkdir(outputdir)
batchcmds:show_progress(opt.progress, "${color.build.object}compiling.qt.ts %s", sourcefile_ts)
batchcmds:vrunv(lrelease, {path(sourcefile_ts), "-qm", path(outfile)})
batchcmds:add_depfiles(sourcefile_ts)
end)
end)

0 comments on commit 7b5299b

Please sign in to comment.