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

devtomsci at me.com devtomsci at me.com
Fri Mar 16 18:06:43 CET 2012


Hi Jorg,

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

Thanks, good to know.

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

Yeah it works at project level, but not at product level. I'll raise a bug. I was also getting confused by the fact I needed:

moduleSearchPaths:"x"

./x
./x/LibFoo/
./x/LibFoo/nameNotImportant.qbs

Rather than just:
./x/LibFoo.qbs

Is there a reason we can't support the second form as well? It makes my project structure slightly neater, although it's not a major issue.

> The grammar is in <qbs-repo>/src/lib/parser/qmljs.g
Yikes :) Looking some more in that area, I think Loader::setupInternalPrototype() in QBS/src/lib/language/loader.cpp is more what I was after - a definition of all the properties you can set in the different block types.

FWIW my 50 file + 3 external libraries project is now fully building from qbs :-) Had to hard-code some paths and make some workarounds due to bugs or missing features (QBS-64, QBS-52, QBS-83, QBS-75, QBS-82, at a quick approx) but on the whole it's looking very good and my qbs and qbp files are way neater than their qmake equivalents :)

Cheers,

Tom

On 16 Mar, 2012,at 03:39 PM, Joerg Bornemann <joerg.bornemann at nokia.com> wrote:

> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20120316/08c51773/attachment.html>


More information about the Qbs mailing list