On Friday, 16 December 2016 at 17:21:13 UTC, John Colvin wrote:
On Friday, 16 December 2016 at 15:09:02 UTC, Ilya Yaroshenko wrote:
[...]

Do you actually mean extern(C) or extern(D)? You said both at different points in this thread.

Perhaps this will give you an idea to start from:

name "mir-glas"
sourcePaths "folderWithDiFiles"
importPaths "folderWithDiFiles"
targetType "sourceLibrary"
preBuildCommands "dub build mir-glas-impl --config=static --build=target-native --compiler=ldmd2 --build-mode=singleFile --parallel"
libs "mir-glas-impl"
lflags "-L$MIR_GLAS_IMPL_PACKAGE_DIR"

$MIR_GLAS_IMPL_PACKAGE_DIR is defined by dub, as described in the docs at https://code.dlang.org/package-format?lang=sdl (search for $<name>_PACKAGE_DIR)

Of course mir-glas-impl could be a subconfiguration, or a subpackage or whatever so it's definitely fetched, I'm just trying to communicate that you can call dub in the preBuildCommands and then link to the resulting library using libs and lflags

Reply via email to