Am 12.01.2014 13:11, schrieb Gary Willoughby:

Is it possible to conditionally include source for only 32bit Windows compiler?

Currently my package.json file contains this:

 "sourceFiles-windows-x86": ["lib/windows/x86/tcl86.lib", "lib/windows/x86/tk86.lib"],

This means link these omf format libs if this package is compiled on 32bit Windows and hence assuming the 32bit DMD compiler is used. There is a problem with this approach: is not robust enough!

What i really want this line to mean is that only include these omf format libs if i use the 32bit DMD compiler on 32 or 64bit Windows. For example, people might be using the 32bit DMD compiler on 64bit Windows.

Something like:

 "sourceFiles-windows-dmd32": [...],

Is this possible with dub?

"sourceFiles-windows-x86-dmd" should do the trick. See also
http://code.dlang.org/package-format#build-settings (above the table).