[QBS] How to specify dependency outside of the project heirarchy?

Joerg Bornemann joerg.bornemann at nokia.com
Fri Mar 16 16:39:39 CET 2012


On 15/03/2012 15:41, ext Tom Sutcliffe wrote:

> Firstly I guess does this sound a sensible approach? For a start I don't really like having 3 blocks all with condition:fooSupport (it seems inelegant) and I don't really know if this is the "right" way to do external dependancies - I'm just tring to map from my .pro setup as directly as possible.

Yeah for the moment this is the way to go until we have something more 
convenient.

> Assuming it is reasonable... how do I express the Depends block in the above, to say it needs to look in libFooDir?
> I tried messing with moduleSearchPaths but setting that within the product didn't seem to do the trick and I'm not really sure if that's intended for what I want anyway. Is there some other property I can set in a Depends block to change the lookup behaviour?

I'd say moduleSearchPaths is exactly what you need to set.
Does it work if you set it on project level?

Project {
     moduleSearchPath: ["something"]
     Product {
         // ...
     }
}

> On a side note where can I find the grammar for qbs files? I saw a link somewhere but can't find it now.

The grammar is in <qbs-repo>/src/lib/parser/qmljs.g


BR,

Jörg



More information about the Qbs mailing list