On 10/12/2017 08:26 AM, [email protected] wrote:

is there a way do depend on a product with dynamically generated name? Via id prehaps or some other identifier?

E.g.:

/import qbs/

/import qbs.FileInfo/

/Project/
/{/
/    Product/
/    {/
/        name: FileInfo.baseName(sourceDirectory)/
/    }/
/    Product/
/    {/
/        Depends { name: "???" }/
/    }/
/}/

Is there a way to depend on the first product in the second one?

Note the following in the docs for Product.name: "The value of this property must be a simple JavaScript expression that does not depend on module properties or values that are non-local to this product."

The following works though:

Project {
    property string theName: FileInfo.fileName(path)
    Product {
        name: project.theName
        ...
    }
    Product {
        Depends { name: project.theName }
        ...
    }
}

Christian, do we want to claim this as supported?



Joerg
_______________________________________________
Qbs mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to