diff --git a/source/dub/generators/visuald.d b/source/dub/generators/visuald.d index e4da5b2..56bad34 100644 --- a/source/dub/generators/visuald.d +++ b/source/dub/generators/visuald.d @@ -318,6 +318,13 @@ // Unittests ret.formattedWrite(" %s", type == Config.Unittest? "1" : "0"); + + // compute directory for intermediate files (need dummy/ because of how -op determines the resulting path) + auto relpackpath = pack.path.relativeTo(m_app.mainPackage.path); + uint ndummy = 0; + foreach (i; 0 .. relpackpath.length) + if (pack.path[i] == "..") ndummy++; + string intersubdir = (ndummy*2 > relpackpath.length ? replicate("dummy/", ndummy*2-relpackpath.length) : "") ~ "/" ~ pack.name; // Not yet dynamic stuff ret.formattedWrite(" @@ -362,8 +369,10 @@ 0 0 $(ConfigurationName) - $(OutDir) - +"); + ret.formattedWrite(" .dub/obj/%s\n", intersubdir); + ret.formattedWrite("%s", +" 0