Converting a Visual Studio Solution with many Projects into DUB package?
Guillaume Piolat via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Aug 16 08:53:17 PDT 2016
On Tuesday, 16 August 2016 at 15:46:23 UTC, WhatMeWorry wrote:
>
> I've got a large Visual Studio Solution which contains lots of
> Projects. Each project is a standalone D/OpenGL tutorial. I
> want to make it OS and IDE agnostic so it can be easily played
> with on Windows, Linux, and Mac OS so I thought it best to make
> it a dub package.
>
> I've been reading the DUB documentation but can't seem to find
> a way. So in short, does DUB allow something like sub-packages?
> Or collections of packages?
Yes.
Advice: put the shared code in one package (eventually with
sub-packages but this is a bit harder at the start) and put your
project each in one directory with their own dub.json/dub.sdl
Then you can use "path-based" dependencies to the shared code.
You can check the organization of dplug or GFM, with the
examples/ directory.
You can use sub-packages / configurations for each project but I
find it less clear.
More information about the Digitalmars-d-learn
mailing list