From 2a756e30800a818bfaad63ba4631e12f7901fa9f Mon Sep 17 00:00:00 2001 From: Louis Bailleau Date: Wed, 2 Feb 2022 13:18:47 +0100 Subject: updated `qt.qrc` rule The rule should now be able to cache resources files version and rebuild resources if something changed. --- xmake/rules/qt/qrc/xmake.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmake/rules/qt/qrc/xmake.lua b/xmake/rules/qt/qrc/xmake.lua index 64e37d2ab..da7678ad8 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 outdata:gmatch("([^\n]*)\n?") do + batchcmds:add_depfiles(file) + end -- add deps batchcmds:add_depfiles(sourcefile_qrc) -- cgit v1.3.1