[QBS] Duplicate product name

Thomas Epting thomas.epting.stryker at gmail.com
Mon May 19 09:03:02 CEST 2014


Hi Olivier,

I think you should separate more clearly between projects and products. So
move out the app1, app2 products from the project files to separate .qbs
files and references these from the projects. Example:

------ static.qbs ----
Product {
    type: "staticlibrary"
    name: "mystaticlib
}
------ app1.qbs ----
Product {
    name: "app1"
    Depends { name : "mystaticlib" }
}
------ app2.qbs ----
Product {
    name: "app2"
    Depends { name : "mystaticlib" }
}

---- app1_project.qbs ----
Project {
    references:["static.qbs", "app1.qbs"]
}
---- app2_project.qbs ----
Project {
    references:["static.qbs", "app2.qbs"]
}
---- global.qbs
Project {
    references:["static.qbs", "app1.qbs", "app2.qbs"]
}

This should solve your problem.

Regards,
Thomas



2014-05-18 19:00 GMT+02:00 olivier musse <olivier.musse at sfr.fr>:

>  Hi,
>
> I have an issue while trying to create a project made of multiple
> subprojects.
> I have a project made of multiple application where each application use a
> common static library. I want each application to be able to compile as a
> standalone application but want also a global project to compile all the
> applications in one step
> ------ static.qbs ----
> Product{
>     type:"staticlibrary"
>     name:"mystaticlib
> ....}
> ---- app1.qbs ----
> Project{
>     references:["static.qbs"]
>     Product{
>     name:"app1"
>     Depends { name : "mystaticlib" }
> }
> }
> ---- app2.qbs ----
> Project{
>     references:["static.qbs"]
>     Product{
>     name:"app2"
>     Depends { name : "mystaticlib" }
> }
> }
> ---- global.qbs
> Project{
>
>     SubProject{
>
>         filePath:"app1.qbs"
>
>     }
>
>     SubProject{
>
>         filePath:"app2.qbs"
>
>     }
>
> }
>
> Each project app1.qbs and app2.qbs compile well separately but global.qbs rise up an error: "duplicate product name mystaticlib"
> I found this bug QBS-478 on internet but I think my case is different.
> Does I have done something wrong?
>
> Thanks in advance for help.
>
> Olivier
>
>
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140519/4f129418/attachment.html>


More information about the Qbs mailing list