[Qbs] pre-built products (cont.)

Christian Gagneraud chgans at gmail.com
Sun Sep 10 12:36:20 CEST 2017

On 10 September 2017 at 13:44, Christian Gagneraud <chgans at gmail.com> wrote:
> [sorry, hit send by mistake, please ignore my previous message]
> Hi there,
> In my source tree I have pre-built binaries, these are third-party
> library that we get in binary form only. (PS: don't tell me that it is
> bad, i already know that. I cannot change that, i have to deal with
> it)
> Each of these third party comes with a set of binaries that correspond
> to the different toolchain/targets that we support.
> A typical tree is:
> $topdir/ThirdParty/$name/include
> $topdir/ThirdParty/$name/lib/$os$arch/$libname.{so,dll,lib}

OK, for now i'm using a raw Product item, that only contains an Export
Item, that in turn sets cpp.includePaths, cpp.libraryPaths,
cpp.defines, ...
It works well enough.

Once i got this project ported to Qbs, i will investigate the
Depends.submodules thing....


> So I would like to have a product for each of these, that would export
> a include path, a lib search path and a lib name.
> But of course i don't want these product to be built, because i don't
> have the source code.
> The reason i'm thinking about using the product item is that i can
> then simply add references to the dependings product.
> Is it the right approach?
> Maybe i should come with a Module approach, eg, something similar to
> Qt itself, that would allow me to add:
> Depends {
>    name: "ThirdParty"
>    submodules: [
>       "lib1", "lib2", ...
>    ]
> }
> I never tried that, not sure how to get started...
> Thanks,
> Chris

More information about the Qbs mailing list