Files
UnrealEngineUWP/Engine/Source/Runtime/BinkAudioDecoder/Module/BinkAudioDecoder.Build.cs
dan thompson b85672db7c Switching to a fat binary for OSX bink audio static libs, and adding osx arm 64 for M1
#ROBOMERGE-SOURCE: CL 17216787 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17218103 by dan thompson in ue5-release-engine-test branch]
2021-08-18 13:37:23 -04:00

65 lines
2.2 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
using System.Collections.Generic;
using System.Security.Cryptography;
using UnrealBuildTool;
public class BinkAudioDecoder : ModuleRules
{
// virtual so that NDA platforms can hide secrets
protected virtual string GetLibrary(ReadOnlyTargetRules Target)
{
if (Target.Platform == UnrealTargetPlatform.Win64)
{
return Path.Combine(ModuleDirectory, "..", "SDK", "BinkAudio", "Lib", "binka_ue_decode_win64_static.lib");
}
if (Target.Platform == UnrealTargetPlatform.Linux)
{
return Path.Combine(ModuleDirectory, "..", "SDK", "BinkAudio", "Lib", "libbinka_ue_decode_lnx64_static.a");
}
if (Target.Platform == UnrealTargetPlatform.Mac)
{
return Path.Combine(ModuleDirectory, "..", "SDK", "BinkAudio", "Lib", "libbinka_ue_decode_osxfat_static.a");
}
if (Target.Platform == UnrealTargetPlatform.IOS)
{
return Path.Combine(ModuleDirectory, "..", "SDK", "BinkAudio", "Lib", "libbinka_ue_decode_ios_static.a");
}
if (Target.Platform == UnrealTargetPlatform.Android)
{
return Path.Combine(ModuleDirectory, "..", "SDK", "BinkAudio", "Lib", "libbinka_ue_decode_androidarm64_static.a");
}
return null;
}
public BinkAudioDecoder(ReadOnlyTargetRules Target) : base(Target)
{
ShortName = "BinkAudioDecoder";
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine"
}
);
PublicSystemIncludePaths.Add(Path.Combine(ModuleDirectory, "..", "SDK", "BinkAudio", "Include"));
string Library = GetLibrary(Target);
if (Library != null)
{
// We have to have this because some audio mixers are shared across platforms
// that we don't have libs for (e.g. hololens).
PublicDefinitions.Add("WITH_BINK_AUDIO=1");
PublicAdditionalLibraries.Add(Library);
}
else
{
PublicDefinitions.Add("WITH_BINK_AUDIO=0");
}
}
}