diff options
| author | HapiFive <[email protected]> | 2024-07-03 03:29:43 +0800 |
|---|---|---|
| committer | HapiFive <[email protected]> | 2024-07-03 03:29:43 +0800 |
| commit | bdf2e844c26e0b2e08b44bfc998de2c1b2c61dbe (patch) | |
| tree | 5732cc033f6519ad1f651810e0cb6ba519ee895a | |
| parent | 9c8de1ea614260d6b703d79923cd35e984e0249d (diff) | |
add prefixdir configuration for ts file
| -rw-r--r-- | xmake/rules/qt/ts/xmake.lua | 8 |
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) |
