summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-03 00:36:15 +0800
committerGitHub <[email protected]>2022-02-03 00:36:15 +0800
commit78d24246a850f20690abeb3a7c9973db770f4d76 (patch)
treeeef3487ff6ec55c5b3dbc9b449923a906a8ce087
parentbfac9c2bbd90824765c3ef3da2d3ebd0ce414d46 (diff)
parentf0565665caec770b8323dda563dcc5d3e863a840 (diff)
Merge pull request #2023 from Bricklou/patch-1
updated `qt.qrc` rule
-rw-r--r--xmake/rules/qt/qrc/xmake.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/rules/qt/qrc/xmake.lua b/xmake/rules/qt/qrc/xmake.lua
index 64e37d2ab..28db39f87 100644
--- a/xmake/rules/qt/qrc/xmake.lua
+++ b/xmake/rules/qt/qrc/xmake.lua
@@ -56,6 +56,14 @@ rule("qt.qrc")
batchcmds:mkdir(sourcefile_dir)
batchcmds:vrunv(rcc, {"-name", path.basename(sourcefile_qrc), sourcefile_qrc, "-o", sourcefile_cpp})
batchcmds:compile(sourcefile_cpp, objectfile)
+
+ -- get qrc resources files
+ local outdata = os.iorunv(rcc, {"-name", path.basename(sourcefile_qrc), sourcefile_qrc, "-list"})
+
+ -- add resources files to batch
+ for _, file in ipairs(outdata:split("\n")) do
+ batchcmds:add_depfiles(file)
+ end
-- add deps
batchcmds:add_depfiles(sourcefile_qrc)