Files
UnrealEngine/Engine/Source/Runtime/Online/XMPP/XMPP.Build.cs
2025-05-18 13:04:45 +08:00

54 lines
1.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class XMPP : ModuleRules
{
protected virtual bool bTargetPlatformSupportsStrophe
{
get =>
Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) ||
Target.Platform == UnrealTargetPlatform.Android ||
Target.Platform == UnrealTargetPlatform.IOS ||
Target.Platform == UnrealTargetPlatform.Mac ||
Target.IsInPlatformGroup(UnrealPlatformGroup.Unix);
}
protected virtual bool bRequireOpenSSL { get { return false; } }
public XMPP(ReadOnlyTargetRules Target) : base(Target)
{
PublicDefinitions.Add("XMPP_PACKAGE=1");
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"Json"
}
);
if (bTargetPlatformSupportsStrophe)
{
AddEngineThirdPartyPrivateStaticDependencies(Target, "libstrophe");
PrivateDependencyModuleNames.Add("WebSockets");
PrivateDefinitions.Add("WITH_XMPP_STROPHE=1");
}
else
{
PrivateDefinitions.Add("WITH_XMPP_STROPHE=0");
}
if (Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) ||
Target.Platform == UnrealTargetPlatform.Mac ||
bRequireOpenSSL)
{
AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL");
}
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
{
AddEngineThirdPartyPrivateStaticDependencies(Target, "libcurl");
}
}
}