FileTagger { pattern: "*.rc" fileTags: ["rc"] } Rule { inputs: ["rc"] Artifact { fileName: product.destinationDirectory + '/' + input.baseName + '_res.o' fileTags: ["obj"] } prepare: { var cmd; if (product.modules.qbs.architecture == 'x86_64') { cmd = new Command('rc', ['-fo', output.fileName, input.fileName]); } else { cmd = new Command('windres', ['-i', input.fileName, '-o', output.fileName]); } cmd.description = 'compiling ' + FileInfo.fileName(input.fileName); cmd.highlight = 'compiler'; return cmd; } }