Files
UnrealEngineUWP/Engine/Source/ThirdParty/HLMediaLibrary/HLMediaLibrary.Build.cs
David Harvey 37da4676e3 HoloLens build rules: Engine modules part 2
#preflight 628cb13af237058787bb0357
#jira UE-149794
#rnx
#rb Jeff.Fisher

[CL 20361216 by David Harvey in ue5-main branch]
2022-05-25 04:04:16 -04:00

46 lines
1.5 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.IO;
using UnrealBuildTool;
public class HLMediaLibrary : ModuleRules
{
public const string LibraryName = "HLMediaLibrary";
protected virtual string Platform { get => "Windows"; }
protected virtual bool bSupportedPlatform { get => Target.Platform == UnrealTargetPlatform.Win64; }
public HLMediaLibrary(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string BaseDir = Target.UEThirdPartySourceDirectory + LibraryName;
string BinariesDir = Target.UEThirdPartyBinariesDirectory + LibraryName;
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
string Config = Target.Configuration == UnrealTargetConfiguration.Debug ? "Debug" : "Release";
string Arch = Target.WindowsPlatform.GetArchitectureSubpath();
string SubPath = Path.Combine(Platform, Config, Arch);
string LibPath = Path.Combine(BaseDir, "lib", SubPath);
string BinariesPath = Path.Combine(BinariesDir, SubPath);
string dll = String.Format("{0}.dll", LibraryName);
// windows desktop x64 target
if (bSupportedPlatform)
{
// Add the import library
PublicAdditionalLibraries.Add(Path.Combine(LibPath, String.Format("{0}.lib", LibraryName)));
// Delay-load the DLL, so we can load it from the right place first
PublicDelayLoadDLLs.Add(dll);
// Ensure that the DLL is staged along with the executable
RuntimeDependencies.Add(Path.Combine(BinariesPath, dll));
}
}
}