[QBS] Duplicate product name

Thomas Epting thomas.epting.stryker at gmail.com
Mon May 19 10:21:00 CEST 2014


As far as I can see there's no such concept currently. What you could
perhaps do is to load all your projects in QtCreator and manage them in a
session. You could then use either "Build <Specific Project>" or "Build All
Projects", depending on your needs. This should feel a bit like what you
meant. But of course it's only a workaround.

Maybe someone else has a better answer for you?

Regards,
Thomas


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

>  Hi Thomas,
>
> Thanks for your answer. Yes it is one solution, but this implies that the
> global project must we aware of all dependencies of subprojects to list
> them in the global project.
> I found that very restrictive, since moreover my real case is really more
> complex that the one I exposed in my example (I have projects up to 4
> levels).
> I understand why it is working like that in qbs since it creates a build
> tree.
> What I think is missing is the possibility to just aggregate projects so
> that there are all builds as if there are separate projects => separate
> build tree, separate output directory.....
> Is there any way to do that ?
>
> Regards
>
> Olivier
>
>
>
>   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/13a3ac1e/attachment.html>


More information about the Qbs mailing list