How to setup dub to use x86 and x64 dll's when appropriate?

Jacob Carlborg doob at me.com
Tue Feb 26 10:36:49 UTC 2019


On 2019-02-26 05:17, Michelle Long wrote:
> e.g., using sdl for different versions and have it automatically switch.
> 
> What would be nice is if one could stick all the files for x86 in one 
> dir and x64 in the others and they will be used depending on the 
> build(and copied)
> 
> Ideally one can do it for debug and release versions too.

You can use a combination of "sourcePaths" and "excludedSourceFiles" 
(see the documentation of Dub for this [1]). You can also have a look at 
the DWT project as an example [2]. It uses two separate configurations, 
one for Linux and one for Windows. It's use in the case of DWT because 
the whole source tree is different. You might not need to do this.

[1] https://dub.pm/package-format-json
[2] https://github.com/d-widget-toolkit/dwt/blob/master/dub.sdl

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list