You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
If you still need to old behavior of searching for a library we use the new PublicSystemLibraries instead (used very sparingly). Also updated conventions on importing Android libraries to use the newly introduced Android Architecture instead, which is always set to a valid architecuture (unlike Target.Architecture for the general case) Lastly I updated some build.cs files that were doing filesystem enumeration or copying as they were being parsed, this is highly discouraged (partially because we cache filesystem operations but also it adds a cost to something we expect to be very fast). Any operations like this should be done as part of the build if they have to be done at all. #rb none [CL 7918851 by Joakim Lindqvist in Dev-Build branch]
59 lines
2.8 KiB
C#
59 lines
2.8 KiB
C#
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
using UnrealBuildTool;
|
|
using System.IO;
|
|
|
|
public class libWebSockets : ModuleRules
|
|
{
|
|
public libWebSockets(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
Type = ModuleType.External;
|
|
string WebsocketPath = Path.Combine(Target.UEThirdPartySourceDirectory, "libWebSockets", "libwebsockets");
|
|
string PlatformSubdir = Target.Platform.ToString();
|
|
|
|
bool bUseDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT);
|
|
string ConfigurationSubdir = bUseDebugBuild ? "Debug" : "Release";
|
|
if (Target.Platform == UnrealTargetPlatform.HTML5)
|
|
{
|
|
return;
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
|
|
{
|
|
PlatformSubdir = Path.Combine(PlatformSubdir, "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", PlatformSubdir, ConfigurationSubdir, "websockets_static.lib"));
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS ||
|
|
Target.Platform == UnrealTargetPlatform.PS4 || Target.Platform == UnrealTargetPlatform.Switch)
|
|
{
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", Target.Platform.ToString(), ConfigurationSubdir, "libwebsockets.a"));
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Android)
|
|
{
|
|
PublicIncludePaths.Add(Path.Combine(WebsocketPath, "include", PlatformSubdir, "ARMv7"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", Target.Platform.ToString(), "ARMv7", ConfigurationSubdir, "libwebsockets.a"));
|
|
PublicIncludePaths.Add(Path.Combine(WebsocketPath, "include", PlatformSubdir, "ARM64"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", Target.Platform.ToString(), "ARM64", ConfigurationSubdir, "libwebsockets.a"));
|
|
PublicIncludePaths.Add(Path.Combine(WebsocketPath, "include", PlatformSubdir, "x86"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", Target.Platform.ToString(), "x86", ConfigurationSubdir, "libwebsockets.a"));
|
|
PublicIncludePaths.Add(Path.Combine(WebsocketPath, "include", PlatformSubdir, "x64"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", Target.Platform.ToString(), "x64", ConfigurationSubdir, "libwebsockets.a"));
|
|
}
|
|
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
|
|
{
|
|
PlatformSubdir = "Linux/" + Target.Architecture;
|
|
PublicAdditionalLibraries.Add(Path.Combine(WebsocketPath, "lib", PlatformSubdir, ConfigurationSubdir, "libwebsockets.a"));
|
|
}
|
|
else
|
|
{
|
|
// unsupported
|
|
return;
|
|
}
|
|
|
|
PublicIncludePaths.Add(Path.Combine(WebsocketPath, "include", PlatformSubdir));
|
|
|
|
if (Target.Platform != UnrealTargetPlatform.Switch)
|
|
{
|
|
PublicDependencyModuleNames.Add("OpenSSL");
|
|
}
|
|
}
|
|
}
|