summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/qt/ts/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/qt/ts/xmake.lua b/xmake/rules/qt/ts/xmake.lua
index 289f1fa60..ad9fd698f 100644
--- a/xmake/rules/qt/ts/xmake.lua
+++ b/xmake/rules/qt/ts/xmake.lua
@@ -50,8 +50,12 @@ rule("qt.ts")
before_buildcmd_file(function (target, batchcmds, sourcefile_ts, opt)
-- get lrelease
local lrelease = target:data("qt.ts.lrelease")
- local outfile = path.join(target:targetdir(), path.basename(sourcefile_ts) .. ".qm")
- batchcmds:mkdir(target:targetdir())
+ 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)
+ 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)