[Qbs] How do I use Parameter property in a module itself?
Richard Weickelt
richard at weickelt.de
Mon Jun 10 20:32:30 CEST 2019
Ivan,
Do you actually want to achieve this?
Module {
property bool useFeature: false
Probes.BinaryProbe {
condition: useFeature
}
}
Product {
Depends { name: "mymodule"; }
mymodule.useFeature: true
}
The Parameter item, as far as I understand it, makes only sense if you have
- 2 products A and B
- B depends on A and on mymodule
- in the context of B you want to control, how a module "mymodule"
handles A
You wouldn't use it to just parameterize "mymodule", because that can be
achieved with plain properties.
The probably best explanation so far of the Parameter item can be found in
the following blog post:
https://blog.qt.io/blog/2017/09/05/qbs-1-9-released/ I realize that the
reference documentation of the Parameter item is insufficient and the
example in the module documentation could be more sensible.
Richard
More information about the Qbs
mailing list