[QBS] Referencing Rule properties

Christian Kandeler christian.kandeler at qt.io
Wed Aug 10 15:55:59 CEST 2016


On 08/10/2016 03:05 PM, Dennis Tomas wrote:
> Another approach I've tried, but which hasn't worked, was putting the
> rule into a module named "qrc":
>
> Product {
>     Group {
>         fileTags: "qm"
>         qrc.inputs: "qm"
>         qrc.baseName: "translations"
>     }
>     Group {
>         files: "assets/**"
>         fileTags: "asset"
>         qrc.inputs: "asset"
>         qrc.baseName: "assets"
>     }
>     Depends { name: "qrc" }
> [...]
> }
>
> I thought that module properties could be overridden per Group like
> that (like qbs.installDir), but it seems I'm wrong here. When trying to
> access them in the output Artifact of the module's rule (using
> product.moduleProperty()) they are always undefined.

You need to call moduleProperty() on the input artifact object in that 
case (inputs[tag][i].moduleProperty()).


Christian




More information about the Qbs mailing list