On Friday, 18 September 2020 at 11:38:14 UTC, wjoe wrote:
Something like this:
configuration "lib" {
targetType "dynamicLibrary"
sourceDir "source/lib/"
}
configuration "app" {
targetType "executable"
sourceFiles "source/app.d"
linkWith "lib"
}
I found subConfiguration in the docs but that seems to be
related to external dependencies.
app.d merely provides a CLI to the library as well as an option
to run as a server. I don't want to have the overhead of an
entire git repo and such for something that is a single file
and also closely related to the library.
yes just add 2 configurations, use mainSourceFile to specify the
file with main()
"configurations": [
{
"name": "default",
"targetPath": "bin",
"targetType": "executable",
"mainSourceFile": "main/main.d"
"sourcePaths": ["src/"],
},{
"name": "lib",
"targetType": "dynamicLibrary",
"sourcePaths": ["src/"],
}]