dub: Is it possible to have a library target and depend on it in the same dub config?
wjoe
invalid at example.com
Fri Sep 18 14:47:03 UTC 2020
On Friday, 18 September 2020 at 14:15:27 UTC, Steven
Schveighoffer wrote:
> On 9/18/20 7:38 AM, wjoe wrote:
>> [...]
>
> There are other options.
>
> for instance dub (the project) has a library and an
> application. the config looks like this:
>
> configuration "application" {
> targetType "executable"
> mainSourceFile "source/app.d"
> libs "curl"
> versions "DubUseCurl" "DubApplication"
> }
>
> configuration "library" {
> targetType "library"
> excludedSourceFiles "source/app.d"
> copyFiles "bin/libcurl.dll" "bin/libeay32.dll"
> "bin/ssleay32.dll" platform="windows"
> versions "DubUseCurl"
> }
>
> You can also build a subproject in the same repository. In that
> case, you would probably want the app to be the main project,
> and you then depend on the library project via "foo:lib"
>
> -Steve
A subproject. Interesting. this sounds like what I want to do.
More information about the Digitalmars-d-learn
mailing list