You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- windows-based platform extensions broke when old versions of openssl were deleted. - now they re-use the same settings as Win64 #jira UE-131865 #rnx #preflight 623daddb5c488c89d6e008f6 #rb Jeff.Newquist #fyi Pavel.Punsky [CL 19510743 by David Harvey in ue5-main branch]
88 lines
3.4 KiB
C#
88 lines
3.4 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using UnrealBuildTool;
|
|
using System.IO;
|
|
|
|
public class OpenSSL : ModuleRules
|
|
{
|
|
public OpenSSL(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
Type = ModuleType.External;
|
|
|
|
string OpenSSL111cPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.1.1c");
|
|
string OpenSSL111kPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.1.1k");
|
|
string OpenSSL111nPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.1.1n");
|
|
|
|
string PlatformSubdir = Target.Platform.ToString();
|
|
string ConfigFolder = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" : "Release";
|
|
|
|
if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS)
|
|
{
|
|
PublicIncludePaths.Add(Path.Combine(OpenSSL111nPath, "include", PlatformSubdir));
|
|
|
|
string LibPath = Path.Combine(OpenSSL111nPath, "lib", PlatformSubdir);
|
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.a"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.a"));
|
|
}
|
|
else if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
|
|
{
|
|
PlatformSubdir = "Win64";
|
|
string VSVersion = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
|
|
|
|
// Add includes
|
|
PublicIncludePaths.Add(Path.Combine(OpenSSL111nPath, "include", PlatformSubdir, VSVersion));
|
|
|
|
// Add Libs
|
|
string LibPath = Path.Combine(OpenSSL111nPath, "lib", PlatformSubdir, VSVersion, ConfigFolder);
|
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.lib"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.lib"));
|
|
PublicSystemLibraries.Add("crypt32.lib");
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.HoloLens)
|
|
{
|
|
// We do not currently have hololens OpenSSL binaries, lets not pretend we do.
|
|
// This means that builds that depend on OpenSSL (like EngineTest) will succeed, but use of it would fail at runtime.
|
|
|
|
//string VSVersion = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
|
|
|
|
//// Add includes
|
|
//PublicIncludePaths.Add(Path.Combine(OpenSSL111kPath, "include", PlatformSubdir, VSVersion));
|
|
|
|
//// Add Libs
|
|
//string LibPath = Path.Combine(OpenSSL111kPath, "lib", PlatformSubdir, VSVersion, ConfigFolder);
|
|
|
|
//PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.lib"));
|
|
//PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.lib"));
|
|
//PublicSystemLibraries.Add("crypt32.lib");
|
|
}
|
|
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
|
|
{
|
|
string platform = "/Unix/" + Target.Architecture;
|
|
string IncludePath = OpenSSL111nPath + "/include" + platform;
|
|
string LibraryPath = OpenSSL111nPath + "/lib" + platform;
|
|
|
|
PublicIncludePaths.Add(IncludePath);
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/libssl.a");
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/libcrypto.a");
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Android)
|
|
{
|
|
string[] Architectures = new string[] {
|
|
"ARM64",
|
|
"x86",
|
|
"x64",
|
|
};
|
|
|
|
PublicIncludePaths.Add(OpenSSL111nPath + "/include/Android/");
|
|
|
|
foreach(var Architecture in Architectures)
|
|
{
|
|
PublicAdditionalLibraries.Add(OpenSSL111nPath + "/lib/Android/" + Architecture + "/libcrypto.a");
|
|
PublicAdditionalLibraries.Add(OpenSSL111nPath + "/lib/Android/" + Architecture + "/libssl.a");
|
|
}
|
|
}
|
|
}
|
|
}
|