On Fri, 27 Jun 2014 15:26:20 GMT, Maaaks wrote:
For example, I don't like that there seems to be no way to add the
-version=VibeCustomMain
using command-line switches without modifying dub.json.
You can add it in the depending package (i.e. the final application package that gets built). Versions and debug versions are always propagated to the dependencies to ensure a consistent build.
You could also build with custom flags using:
DFLAGS=-version=VibeCustomMain dub build
This will override the flags of the usual build mode (e.g. -g -debug
).
For now, I decided to compile vibe.d itself with Dub. I just modified it a little:
... "dflags": ["-version=VibeCustomMain"] }
After it, I ran
dub build
and gotlibvibe-d.a
in the directory.(This is another reason why I don't like Dub: it always works in current directory. I prefer to have sources in one place and build results in another.)
There is a targetPath
setting for specifying where the final binaries are put. Or do you mean that you prefer to put the build results to a whole different location (e.g. ~/my_build_results/libvibe-d.a
)?