Files
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

69 lines
2.0 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class nghttp2 : ModuleRules
{
protected readonly string Version = "1.64.0";
public nghttp2(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string VersionPath = Path.Combine(ModuleDirectory, Version);
string LibraryPath = Path.Combine(VersionPath, "lib");
string IncludePath = Path.Combine(VersionPath, "include");
if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
{
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "Unix", Target.Architecture.LinuxName, "Release", "libnghttp2.a"));
PublicSystemIncludePaths.Add(IncludePath);
AddAdditionalDependencies();
}
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
{
string[] Architectures = new string[] {
"ARM64",
"x64",
};
foreach(var Architecture in Architectures)
{
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "Android", Architecture, "Release", "libnghttp2.a"));
}
PublicSystemIncludePaths.Add(IncludePath);
AddAdditionalDependencies();
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "Mac", "Release", "libnghttp2.a"));
PublicSystemIncludePaths.Add(IncludePath);
AddAdditionalDependencies();
}
else if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
{
string PlatformSubdir = "Win64";
if (Target.Architecture == UnrealArch.Arm64)
{
// BuildForUE puts the arm64 in <Platform>/<Arch>
PlatformSubdir = Path.Combine(PlatformSubdir, "arm64");
}
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, PlatformSubdir, "Release", "nghttp2.lib"));
PublicSystemIncludePaths.Add(IncludePath);
PublicDefinitions.Add("NGHTTP2_STATICLIB=1");
AddAdditionalDependencies();
}
}
protected void AddAdditionalDependencies()
{
// Our build requires OpenSSL and zlib, so ensure they're linked in
AddEngineThirdPartyPrivateStaticDependencies(Target, new string[]
{
"OpenSSL",
"zlib"
});
}
}