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 should not use MfMedia player now - should change to WmfMedia for the time being. #jira UE-131865 #rb Eric.McDaniel #preflight 62347b390820efd09469a25a [CL 19434256 by David Harvey in ue5-main branch]
81 lines
2.7 KiB
C#
81 lines
2.7 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using UnrealBuildTool;
|
|
using System.IO;
|
|
using System;
|
|
|
|
public class WebRTC : ModuleRules
|
|
{
|
|
protected string ConfigPath {get; private set; }
|
|
|
|
protected virtual bool bShouldUseWebRTC
|
|
{
|
|
get =>
|
|
Target.Platform.IsInGroup(UnrealPlatformGroup.Windows) ||
|
|
(Target.IsInPlatformGroup(UnrealPlatformGroup.Unix) && Target.Architecture.StartsWith("x86_64"));
|
|
}
|
|
|
|
public WebRTC(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
Type = ModuleType.External;
|
|
|
|
// WebRTC binaries with debug symbols are huge hence the Release binaries do not have any
|
|
// if you want to have debug symbols with shipping you will need to build with debug instead
|
|
if (Target.Configuration == UnrealTargetConfiguration.Shipping)
|
|
{
|
|
ConfigPath = "Release";
|
|
}
|
|
else
|
|
{
|
|
ConfigPath = "Release";
|
|
}
|
|
|
|
if (bShouldUseWebRTC)
|
|
{
|
|
string WebRtcSdkPath = Target.UEThirdPartySourceDirectory + "WebRTC/4147"; // Branch head 4147 is Release 84
|
|
string VS2013Friendly_WebRtcSdkPath = Target.UEThirdPartySourceDirectory;
|
|
|
|
string PlatformSubdir = Target.Platform.ToString();
|
|
|
|
string IncludePath = Path.Combine(WebRtcSdkPath, "Include");
|
|
PublicSystemIncludePaths.Add(IncludePath);
|
|
|
|
string AbslthirdPartyIncludePath = Path.Combine(WebRtcSdkPath, "Include", "third_party", "abseil-cpp");
|
|
PublicSystemIncludePaths.Add(AbslthirdPartyIncludePath);
|
|
|
|
if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
|
|
{
|
|
PublicDefinitions.Add("WEBRTC_WIN=1");
|
|
|
|
PlatformSubdir = "Win64"; // windows-based platform extensions can share this library
|
|
string LibraryPath = Path.Combine(WebRtcSdkPath, "Lib", PlatformSubdir, ConfigPath);
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "webrtc.lib"));
|
|
|
|
// Additional System library
|
|
PublicSystemLibraries.Add("Secur32.lib");
|
|
|
|
// The version of webrtc we depend on, depends on an openssl that depends on zlib
|
|
AddEngineThirdPartyPrivateStaticDependencies(Target, "zlib");
|
|
AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL");
|
|
AddEngineThirdPartyPrivateStaticDependencies(Target, "libOpus");
|
|
|
|
}
|
|
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
|
|
{
|
|
PublicDefinitions.Add("WEBRTC_LINUX=1");
|
|
PublicDefinitions.Add("WEBRTC_POSIX=1");
|
|
|
|
// This is slightly different than the other platforms
|
|
string LibraryPath = Path.Combine(WebRtcSdkPath, "Lib", PlatformSubdir, Target.Architecture, ConfigPath);
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "libwebrtc.a"));
|
|
|
|
AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL");
|
|
AddEngineThirdPartyPrivateStaticDependencies(Target, "libOpus");
|
|
}
|
|
}
|
|
|
|
PublicDefinitions.Add("WEBRTC_VERSION=84");
|
|
PublicDefinitions.Add("ABSL_ALLOCATOR_NOTHROW=1");
|
|
}
|
|
}
|