[QBS] Link static libraries with shared library.
Joerg Bornemann
joerg.bornemann at digia.com
Mon Oct 1 09:58:50 CEST 2012
On 28/09/2012 14:24, Ruslan Nigmatullin wrote:
[...]
> But it's ugly as we can't resolve product dependencies. May be it's possible to create automatic Depends notation? Like this:
>
> CppApplication {
> name: "myapp"
>
> // Pick up all artifacts with this tag from all products
> Depends {
> id: staticPlugins
> fileTags: "staticplugin"
> }
>
> // So qbs could determine all out dependencies and application will be built correctly
> cpp.staticLibraries: {
> var result = [];
> for (var i in staticPlugins)
> result.push(staticPlugins[i].fileName);
> return result;
> }
>
> This looks better, but breaks current idea that all dependencies are listed directly.
This would add all "staticplugin" products as dependency to "myapp".
We could mix both approaches.
Depends {
names: project.products.filter(function(x) { return
x.fileTags.indexOf("staticplugin") >= 0; }).map(function(x){ return
x.name; }
}
Depends.names gets a list of dependency names.
project.products is a list of product objects.
Cheers,
Jörg
--
Joerg Bornemann, Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
More information about the Qbs
mailing list