diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs index 0c91a121d..1035e9271 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs @@ -41,6 +41,9 @@ namespace Flax.Deps.Dependencies } } + /// + public override bool BuildByDefault => false; + private string root; private void Build(BuildOptions options, TargetPlatform targetPlatform, TargetArchitecture architecture) diff --git a/Source/Tools/Flax.Build/Deps/Dependency.cs b/Source/Tools/Flax.Build/Deps/Dependency.cs index 89573737c..bcb426182 100644 --- a/Source/Tools/Flax.Build/Deps/Dependency.cs +++ b/Source/Tools/Flax.Build/Deps/Dependency.cs @@ -51,6 +51,11 @@ namespace Flax.Deps /// public abstract TargetPlatform[] Platforms { get; } + /// + /// True if build dependency by default, otherwise only when explicitly specified via command line. + /// + public virtual bool BuildByDefault => true; + /// /// Builds the dependency package using the specified options. /// diff --git a/Source/Tools/Flax.Build/Deps/DepsBuilder.cs b/Source/Tools/Flax.Build/Deps/DepsBuilder.cs index 31b62d260..ab34f4eb7 100644 --- a/Source/Tools/Flax.Build/Deps/DepsBuilder.cs +++ b/Source/Tools/Flax.Build/Deps/DepsBuilder.cs @@ -62,7 +62,7 @@ namespace Flax.Deps { var dependency = dependencies[i]; var name = dependency.GetType().Name; - if (depsToBuild.Length > 0) + if (depsToBuild.Length > 0 || !dependency.BuildByDefault) { if (!depsToBuild.Contains(name.ToLower())) {