You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
(based from commit d2d9eab01bf364dce4edee40e6f4ac94b23a7d42)
(cherry picked from commit d072e2774e)
94 lines
3.8 KiB
C#
94 lines
3.8 KiB
C#
// Copyright 1998-2019 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 OpenSSL101sPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1_0_1s");
|
|
string OpenSSL102hPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1_0_2h");
|
|
string OpenSSL102Path = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.0.2g");
|
|
string OpenSSL111Path = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.1.1");
|
|
|
|
string PlatformSubdir = Target.Platform.ToString();
|
|
string ConfigFolder = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" : "Release";
|
|
|
|
if (Target.Platform == UnrealTargetPlatform.Mac)
|
|
{
|
|
PublicIncludePaths.Add(Path.Combine(OpenSSL102Path, "include", PlatformSubdir));
|
|
|
|
string LibPath = Path.Combine(OpenSSL102Path, "lib", PlatformSubdir, ConfigFolder);
|
|
//PublicLibraryPaths.Add(LibPath);
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.a"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.a"));
|
|
PublicAdditionalLibraries.Add("z");
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.PS4)
|
|
{
|
|
string IncludePath = Target.UEThirdPartySourceDirectory + "OpenSSL/1.0.2g" + "/" + "include/PS4";
|
|
string LibraryPath = Target.UEThirdPartySourceDirectory + "OpenSSL/1.0.2g" + "/" + "lib/PS4/release";
|
|
PublicIncludePaths.Add(IncludePath);
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/" + "libssl.a");
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/" + "libcrypto.a");
|
|
}
|
|
// @ATG_CHANGE : BEGIN UWP support
|
|
else if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 ||
|
|
Target.Platform == UnrealTargetPlatform.UWP64 || Target.Platform == UnrealTargetPlatform.UWP32)
|
|
// @ATG_CHANGE : END
|
|
{
|
|
// Our OpenSSL 1.1.1 libraries are built with zlib compression support
|
|
PrivateDependencyModuleNames.Add("zlib");
|
|
|
|
string VSVersion = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
|
|
|
|
// Add includes
|
|
PublicIncludePaths.Add(Path.Combine(OpenSSL111Path, "include", PlatformSubdir, VSVersion));
|
|
|
|
// Add Libs
|
|
string LibPath = Path.Combine(OpenSSL111Path, "lib", PlatformSubdir, VSVersion, ConfigFolder);
|
|
PublicLibraryPaths.Add(LibPath);
|
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.lib"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.lib"));
|
|
PublicAdditionalLibraries.Add("crypt32.lib");
|
|
}
|
|
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
|
|
{
|
|
string platform = "/Linux/" + Target.Architecture;
|
|
string IncludePath = OpenSSL102hPath + "/include" + platform;
|
|
string LibraryPath = OpenSSL102hPath + "/lib" + platform;
|
|
|
|
PublicIncludePaths.Add(IncludePath);
|
|
PublicLibraryPaths.Add(LibraryPath);
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/libssl.a");
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/libcrypto.a");
|
|
|
|
PublicDependencyModuleNames.Add("zlib");
|
|
// PublicAdditionalLibraries.Add("z");
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Android)
|
|
{
|
|
string IncludePath = OpenSSL101sPath + "/include/Android";
|
|
PublicIncludePaths.Add(IncludePath);
|
|
|
|
// unneeded since included in libcurl
|
|
// string LibPath = Path.Combine(OpenSSL101sPath, "lib", PlatformSubdir);
|
|
//PublicLibraryPaths.Add(LibPath);
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.IOS)
|
|
{
|
|
string IncludePath = OpenSSL101sPath + "/include/IOS";
|
|
string LibraryPath = OpenSSL101sPath + "/lib/IOS";
|
|
|
|
PublicIncludePaths.Add(IncludePath);
|
|
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/libssl.a");
|
|
PublicAdditionalLibraries.Add(LibraryPath + "/libcrypto.a");
|
|
}
|
|
}
|
|
}
|