Hi all, I’ve played around with qbs to get a app/lib dependency graph generated using the graphviz. Basically I got it working but I’m not happy with the way how to integrate it an existing project. The attached example illustrates it. The basic idea is to add Depends { name: "depgraph” } to every product (i.e. static/dynamic lib and app) that should appear in the dependency graph. Each of those product generate a dot-fragment with its name and its direct dependencies. Finally another rule is applied that merges the dot-fragments into the final dot file, that is represented by a Product of type “dot”. To get the desired output I had to add an additional statement to the qbs files that I did not want to be there: Just "Depends { name: "depgraph” }” was not enough, I had to extend the type of every lib to get all dependencies show up in the graph, i.e. Depends { name: "depgraph" } type: base.concat(["dot-fragment”]) Don’t understand why this is needed and I’d like to get rid of it. If other stuff can be simplified I would be very happy for suggestions. The leanest way from a qbs user perspective would be to just do a ----- CppApplication { name: “app” ... } DotDependencyGraph { name: “app-dependency-graph” Depends { name: “app” } } ----- So no need to add a Depends to every related product and just pull the dependencies via the single app dependency, but no idea if this would be possible and how to do it. Thanks and best regards, Max P.S: I also attached the correct, desired graph output for reference |
<<attachment: qbstest.zip>>
app-dependency-graph.dot.pdf
Description: Adobe PDF document
_______________________________________________ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs