On Mon, 21 Oct 2013 12:18:18 +0200, Sönke Ludwig wrote:
Hope this works out.
Well, here's the solution I wound up with:
{
"name": "dgraph",
"version": "~master",
"description": "A library for creating, analysing and manipulating graphs (networks). It aims to be fast and memory-efficient while also being easy to use and extend.",
"authors": ["Joseph Rushton Wakeling"],
"copyright": "Copyright © 2013 Joseph Rushton Wakeling",
"homepage": "https://github.com/WebDrake/Dgraph",
"license": "GPL-3.0 or later",
"targetType": "sourceLibrary",
"subPackages": [
{
"name": "graphtest",
"targetType": "executable",
"sourcePaths": ["util/graphtest/source/"],
"dependencies": { "dgraph": "~master" }
},
{
"name": "betweenness50",
"targetType": "executable",
"sourcePaths": ["util/betweenness50/source/"],
"dependencies": { "dgraph": "~master" }
},
{
"name": "betweenness10k",
"targetType": "executable",
"sourcePaths": ["util/betweenness10k/source/"],
"dependencies": { "dgraph": "~master" }
}
]
}
dub build dgraph:whatever
works to build any of the executables, and downstream projects seem to interact fine with dgraph as a sourceLibrary. The one thing I'd like to have is some way to build all of the executables at once -- dub build dgraph:util
or something like that; I tried creating a subpackage with "targetType": "none"
with dependencies on all of them, but dub rejected that as "none" implied, nothing to build.
I didn't quite follow your proposal to have a separate package.json in each of the different executables' project directories -- how would this work from a dub build
perspective?