diff --git a/source/dub/description.d b/source/dub/description.d index e958501..cc7a9b7 100644 --- a/source/dub/description.d +++ b/source/dub/description.d @@ -52,6 +52,8 @@ string license; string[] dependencies; + bool active; /// Does this package take part in the build? + string configuration; /// The configuration that is built @byName TargetType targetType; string targetPath; string targetName; diff --git a/source/dub/package_.d b/source/dub/package_.d index 9e88c2d..45e4db2 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -366,6 +366,7 @@ PackageDescription describe(BuildPlatform platform, string config) const { PackageDescription ret; + ret.configuration = config; ret.path = m_path.toNativeString(); ret.name = this.name; ret.version_ = this.ver; diff --git a/source/dub/project.d b/source/dub/project.d index 9da370a..bc448ba 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -592,6 +592,9 @@ foreach (dep; m_dependencies) ret.packages ~= dep.describe(platform, configs[dep.name]); + foreach (p; getTopologicalPackageList(false, null, configs)) + ret.packages[ret.packages.countUntil!(pp => pp.name == p.name)].active = true; + if (build_type.length) { // collect build target information (useful for build tools) GeneratorSettings settings;