[QBS] Referencing Rule properties

Dennis Tomas den.t at gmx.de
Fri Jul 29 21:05:41 CEST 2016


I have a custom rule for generating qrc files, which I'd like to use 
several times in a product. I'd like to pass it the generated file's 
base name using a property on the Rule:

Product {
         inputs: ["qm"]
         baseName: "translations"
     QrcGenerator {
         inputs: ["asset"]
         baseName: "assets"

The rule (QrcGenerator.qbs) looks like this:

Rule {
     property string fileName: "resources"
     multiplex: true
     Artifact {
         filePath: baseName + ".qrc" // ReferenceError
         fileTags: ["qrc"]
     prepare: {

I get a ReferenceError as marked above. Is there a way to somehow 
reference baseName from the Artifact's filePath property?


More information about the Qbs mailing list