// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using Flax.Build;
using Flax.Build.NativeCpp;
///
/// https://github.com/ARM-software/astc-encoder
///
public class astc : DepsModule
{
///
/// Returns true if can use astc lib for a given build setup.
///
public static bool IsSupported(BuildOptions options)
{
switch (options.Platform.Target)
{
case TargetPlatform.Windows:
return true;
case TargetPlatform.Mac:
return options.Architecture == TargetArchitecture.ARM64;
default:
return false;
}
}
///
public override void Init()
{
base.Init();
LicenseType = LicenseTypes.Apache2;
LicenseFilePath = "LICENSE.txt";
// Merge third-party modules into engine binary
BinaryModuleName = "FlaxEngine";
}
///
public override void Setup(BuildOptions options)
{
base.Setup(options);
options.PublicDefinitions.Add("COMPILE_WITH_ASTC");
AddLib(options, options.DepsFolder, "astcenc");
}
}