After working with VariantDir for a long time (it didn’t do anything at all), I ended up using the variant_dir
parameter in a top-level SConscript call, which leads to all downstream assembly outputs ending in parallel “assembly”, tree: SConscript(['subdirs/SConscript'], variant_dir='build', duplicate=0)
My assembly structure is a hierarchy of SConscripts in sub-subdirs / sub-subdirs, etc. With this call, the outputs are in the lines / sub-subdirs at the same level as in the source.
This eats up one level though (subdirs), and using "../build" doesn't help. The solution is to keep the SConscript file at the same level as SConstruct and call SConscript(['SConscript'], variant_dir='build', duplicate=0)
See also the output of Force Scons (exe, obj, lib, and dll) to a specific build directory - it has a similar answer
source share