On Wed, 24 May 2017 09:10:24 +0200
Timur Kristóf <[email protected]> wrote:

> I have a Qbs project that contains a static library and an executable
> that depends on the static library. The static library has some
> features which can be enabled or disabled through a couple of bool
> properties. It has a "myIncludes" property which contains the pathList
> of the include paths of its currently enabled features, and the
> executable needs to use these among its include paths.
> 
> What is the correct way to do this with Qbs?

A product's properties are "private" in that they are not accessible from other 
products. You add module properties such as cpp.includePaths to depending 
products using an Export item:

Product {
    name: "ex"
    // ...
    Export {
        Depends { name: "cpp" }
        cpp.includePaths: product.myIncludes // "product" refers to the 
exporting product
    }
}

Note that you don't have to do anything in the other product except adding the 
dependency to "ex".


Hope this helps,
Christian
_______________________________________________
Qbs mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to