summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-03 09:30:20 +0800
committerGitHub <[email protected]>2024-07-03 09:30:20 +0800
commit7b5299b4f83923bed32654d5cfb4b37c1d40776f (patch)
tree1e308242e280a59611b663fa8c480049db410cb3
parent66a184fcaf241462545b119ddfdae45cd2b2f3fe (diff)
Update xmake.lua
-rw-r--r--xmake/rules/qt/ts/xmake.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/rules/qt/ts/xmake.lua b/xmake/rules/qt/ts/xmake.lua
index ad9fd698f..6ddfeb703 100644
--- a/xmake/rules/qt/ts/xmake.lua
+++ b/xmake/rules/qt/ts/xmake.lua
@@ -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) \ No newline at end of file
+ end)