[QBS] What is the suggested way to do deeply nested projects?

Joerg Bornemann joerg.bornemann at digia.com
Wed Aug 13 11:36:07 CEST 2014

On 12-Aug-14 15:07, Alexandre Cossette-Pacheco wrote:

> However, project names have stayed awkward to this day; both with Qmake
> and Qbs (our current build system is Qmake, but we maintain scripts that
> parse our .pro files and generate .qbs so we can track progress on Qbs).
> The best we've found yet is to use underscore in project names. But it
> becomes super awkward for some of our modules that already include
> underscores in their names (we end up with project
> "company_product_some_module_submodule"). It would be nice and natural
> of we could have project contain nice dots in there (or do you have a
> better separator than '_' to propose?). And yes, we do also have some
> .NET projects here and it is nice to follow similar naming conventions :).

The dot is supposed to reflect the directory structure of modules. 
That's why it's handled specially.
You can use any other character than the dot as separator.
Product.name doesn't have to be a valid JavaScript identifier.
So maybe use company-product-something-else or 

And then maybe add a base item like
     Product {
        targetName: String.replace(name, "::", ".")
that automatically sets the targetName to a string with dots.

I currently do not see a nice way how to magically determine whether a 
dot in a name means "hierarchy separator" or "it's just a dot".

> Else, we're overall very happy about how Qbs is shaping up. It's a great
> step up for us from qmake, in terms of raw power of customizing our
> build process, in terms of performance and in terms of usability.

That's nice to read! :)



More information about the Qbs mailing list