Files
UnrealEngineUWP/Engine/Source/ThirdParty/SDL2/SDL2.Build.cs
aurel cordonnier a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00

37 lines
1.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class SDL2 : ModuleRules
{
protected virtual string SDL2Version { get { return "SDL-gui-backend"; } }
protected virtual string IncRootDirectory { get { return Target.UEThirdPartySourceDirectory; } }
protected virtual string LibRootDirectory { get { return Target.UEThirdPartySourceDirectory; } }
protected virtual string SDL2IncPath { get { return Path.Combine(IncRootDirectory, "SDL2", SDL2Version, "include"); } }
protected virtual string SDL2LibPath { get { return Path.Combine(LibRootDirectory, "SDL2", SDL2Version, "lib"); } }
public SDL2(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
// assume SDL to be built with extensions
PublicDefinitions.Add("SDL_WITH_EPIC_EXTENSIONS=1");
PublicIncludePaths.Add(SDL2IncPath);
if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
{
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
// Debug version should be built with -fPIC and usable in all targets
PublicAdditionalLibraries.Add(Path.Combine(SDL2LibPath, "Unix", Target.Architecture, "libSDL2_fPIC_Debug.a"));
}
else
{
PublicAdditionalLibraries.Add(Path.Combine(SDL2LibPath, "Unix", Target.Architecture, "libSDL2_fPIC.a"));
}
}
}
}