<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Thomas,<br>
      <br>
      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. <br>
      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). <br>
      I understand why it is working like that in qbs since it creates a
      build tree. <br>
      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.....
      <br>
      Is there any way to do that ? <br>
      <br>
      Regards<br>
      <br>
      Olivier<br>
      <br>
      <br>
      <br>
    </div>
    <blockquote
cite="mid:CABL2V8hbD63pHS9DpT9RKJ=8MxKSjeMxkmLV2gtB1+H12htS=g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hi Olivier,<br>
            <br>
            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:<br>
            <br>
            ------ static.qbs ---- <br>
            Product {<br>
                type: "staticlibrary"<br>
                name: "mystaticlib<br>
            }<br>
            ------ app1.qbs ---- <br>
            Product {<br>
                name: "app1"<br>
                Depends<span style="color:rgb(192,192,192)"> </span>{<span
              style="color:rgb(192,192,192)"> </span><span
              style="color:rgb(128,0,0)">name</span><span
              style="color:rgb(192,192,192)"> </span>:<span
              style="color:rgb(192,192,192)"> </span><span
              style="color:rgb(0,128,0)">"</span><span
              style="color:rgb(0,128,0)">mystaticlib"</span><span
              style="color:rgb(192,192,192)"> </span>}<br>
            }<br>
            ------ app2.qbs ---- <br>
            Product {<br>
                name: "app2"<br>
                Depends<span style="color:rgb(192,192,192)"> </span>{<span
              style="color:rgb(192,192,192)"> </span><span
              style="color:rgb(128,0,0)">name</span><span
              style="color:rgb(192,192,192)"> </span>:<span
              style="color:rgb(192,192,192)"> </span><span
              style="color:rgb(0,128,0)">"</span><span
              style="color:rgb(0,128,0)">mystaticlib"</span><span
              style="color:rgb(192,192,192)"> </span>}<br>
            }<br>
            <br>
            ---- app1_project.qbs ----<br>
            Project {<br>
                references:["static.qbs", "app1.qbs"]<br>
            }<br>
            ---- app2_project.qbs ----<br>
            Project {<br>
                references:["static.qbs", "app2.qbs"]<br>
            }<br>
            ---- global.qbs<br>
            Project {<br>
                references:["static.qbs", "app1.qbs", "app2.qbs"]<br>
            }<br>
            <br>
          </div>
          This should solve your problem.<br>
          <br>
        </div>
        Regards,<br>
        Thomas<br>
        <div>
          <div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2014-05-18 19:00 GMT+02:00 olivier
          musse <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:olivier.musse@sfr.fr" target="_blank">olivier.musse@sfr.fr</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> Hi,<br>
              <br>
              I have an issue while trying to create a project made of
              multiple subprojects. <br>
              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<br>
              ------ static.qbs ---- <br>
              Product{<br>
                  type:"staticlibrary"<br>
                  name:"mystaticlib<br>
              ....}<br>
              ---- app1.qbs ----<br>
              Project{<br>
                  references:["static.qbs"]<br>
                  Product{<br>
                  name:"app1"<br>
                  Depends<span style="color:#c0c0c0"> </span>{<span
                style="color:#c0c0c0"> </span><span
                style="color:#800000">name</span><span
                style="color:#c0c0c0"> </span>:<span
                style="color:#c0c0c0"> </span><span
                style="color:#008000">"</span><span
                style="color:#008000">mystaticlib"</span><span
                style="color:#c0c0c0"> </span>}<br>
              }<br>
              }<br>
              ---- app2.qbs ----<br>
              Project{<br>
                  references:["static.qbs"]<br>
                  Product{<br>
                  name:"app2"<br>
                  Depends<span style="color:#c0c0c0"> </span>{<span
                style="color:#c0c0c0"> </span><span
                style="color:#800000">name</span><span
                style="color:#c0c0c0"> </span>:<span
                style="color:#c0c0c0"> </span><span
                style="color:#008000">"</span><span
                style="color:#008000">mystaticlib"</span><span
                style="color:#c0c0c0"> </span>}<br>
              }<br>
              }<br>
              ---- global.qbs<br>
              Project{
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span>SubProject{</pre>
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">        </span><span style="color:#800000">filePath</span>:<span style="color:#008000">"app1.qbs"</span></pre>
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span>}</pre>
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span>SubProject{</pre>
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">        </span><span style="color:#800000">filePath</span>:<span style="color:#008000">"app2.qbs"</span></pre>
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span>}</pre>
              <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">}

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 
</pre>
            </div>
            <br>
            _______________________________________________<br>
            QBS mailing list<br>
            <a moz-do-not-send="true" href="mailto:QBS@qt-project.org">QBS@qt-project.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.qt-project.org/mailman/listinfo/qbs"
              target="_blank">http://lists.qt-project.org/mailman/listinfo/qbs</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>