On 05/31/2015 11:48 PM, Manu via Digitalmars-d wrote:

As for dub, I'd use it if it worked like a package manager; dub get
libcurl-d libqt-d zlib-d libsdl2-d etc
I have no use for it as a build system, and therefore it's expression
of dependencies is no use to me. I just want something that works the
same way as '-dev' packages already work perfectly well in linux, that
is, they fetch headers and libs, and put them in a standard location
that all the tooling can find.


Ditto. Dub's great if you let it be your buildsystem, but as soon as you want to use it as a package-manager-only it becomes an uphill battle with dub fighting back every step of the way (I speak from experience). That problem is worse if your project is a library that you want fetchable through dub.

That's why I've been working on some PRs to fix all that. The first step is here (building/expanding on a flag another contributer recently added):

https://github.com/D-Programming-Language/dub/pull/572

(Although I think I may need to change --data=libs and separate system libs from dependency libs since linkers expect those to be passed in differently.)

The next step will be to add a flag to have that data get output in a compiler-ready argument list (your choice of compiler, of course). That'll let you do something comparable to "pkg-config --cflags --libs".

Then finally, a shortcut flag so you can just do something kinda like:

rdmd --build-only `dub describe --cmdargs=rdmd` src/main.d

And all your dependencies will be properly referenced (-I..., linker flags, etc).

Reply via email to