[Qbs] Build and run a AuxiliaryApplication before build a MainApplication

Alberto Mardegan mardy at users.sourceforge.net
Wed Feb 10 15:54:37 CET 2021


Just got some more thoughts:

On 10/02/21 11:48, Карелин Павел wrote:
> --- parsetrigrams.qbs ---
> import qbs
> import qbs.FileInfo
> 
> Product {
>     name: "SonnetParseTrigrams"
>     targetName: "sonnet_parsetrigrams"
>     condition: true
> 
>     type: "application"

You can add an additional type here, like

    type: ["application", "trigram-generator"]

And then:

> --- qgit.qbs ---
> import qbs
> import qbs.FileInfo
> 
> Product {
>     name: "QGit"
>     targetName: "qgit"
> 
>     type: "application"
>     destinationDirectory: "./bin"
> 
>     Depends { name: "cpp" }
>     Depends { name: "SonnetParseTrigrams" }
>     Depends { name: "Qt"; submodules: ["core", "widgets"] }

Here add

    Depends { productTypes: ["trigram-generator"] }

and in your Rule add

    explicitlyDependsOnFromDependencies: ["trigram-generator"]

I'm not 100% sure that the last one is needed, but it seems to make
sense :-)

Ciao,
  Alberto

-- 
http://www.mardy.it - Geek in un lingua international


More information about the Qbs mailing list