www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to set up multi-dimensional DUB package configuration?

reply Dukc <ajieskola gmail.com> writes:
My application has two copyright holders, so I want to be able to 
specify in the build command whose copyright marks get compiled 
to the program. D part of the application is built by DUB. DUB 
configurations would do the trick, but they are already used to 
define different editions of the application. I have to be able 
to choose the edition indepently of the copyright holder.

I don't necessarily need two-dimensional configuration. If there 
a way to order DUB to define an extra D version without altering 
`dub.sdl` to do that, it would suffice. But is there?
Feb 12 2020
parent Dukc <ajieskola gmail.com> writes:
Illustration, I want to choose both an edition and marked 
copyright holder:

```
configuration "inhouse" {
     targetType "executable"
     versions "InhouseEdition"
}
configuration "salesmen" {
     targetType "executable"
     versions "SalesmenEdition"
}
configuration "internet" {
     targetType "executable"
     versions "InternetEdition"
}
configuration "copyrightcompanya" {
	versions "CopyrightCompanyA"
}
configuration "copyrightcompanyb" {
	versions "CopyrightCompanyB"
}
```
Feb 12 2020