Files
UnrealEngineUWP/Engine/Source/ThirdParty/Perforce/Perforce.Build.cs
michael kirzinger 2fa95114f0 Copying //UE4/Dev-Online to Dev-Main (//UE4/Dev-Main)
Source: //UE4/Dev-Online 4860295

#rb none

#ROBOMERGE-OWNER: ryan.vance
#ROBOMERGE-AUTHOR: michael.kirzinger
#ROBOMERGE-SOURCE: CL 4860323 in //UE4/Main/...
#ROBOMERGE-BOT: DEVVR (Main -> Dev-VR)

[CL 4860333 by michael kirzinger in Dev-VR branch]
2019-01-31 15:09:49 -05:00

62 lines
2.3 KiB
C#

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class Perforce : ModuleRules
{
public Perforce(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
{
string Windows_P4APIPath = Target.UEThirdPartySourceDirectory + "Perforce/p4api-2018.1/";
string PlatformSubdir = Target.Platform.ToString();
string VisualStudioVersionFolder = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
string IncludeFolder = Path.Combine(Windows_P4APIPath, "Include", PlatformSubdir, VisualStudioVersionFolder);
PublicSystemIncludePaths.Add(IncludeFolder);
string ConfigPath = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" :"Release";
string LibFolder = Path.Combine(Windows_P4APIPath, "Lib", PlatformSubdir, VisualStudioVersionFolder, ConfigPath);
PublicAdditionalLibraries.Add(Path.Combine(LibFolder, "libclient.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibFolder, "librpc.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibFolder, "libsupp.lib"));
}
else
{
string LibFolder = "lib/";
string LibPrefix = "";
string LibPostfixAndExt = ".";
string P4APIPath = Target.UEThirdPartySourceDirectory + "Perforce/p4api-2015.2/";
if (Target.Platform == UnrealTargetPlatform.Mac)
{
P4APIPath = Target.UEThirdPartySourceDirectory + "Perforce/p4api-2014.1/";
LibFolder += "mac";
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
P4APIPath = Target.UEThirdPartySourceDirectory + "Perforce/p4api-2014.1/" ;
LibFolder += "linux/" + Target.Architecture;
}
LibPrefix = P4APIPath + LibFolder + "/";
LibPostfixAndExt = ".a";
PublicSystemIncludePaths.Add(P4APIPath + "include");
PublicAdditionalLibraries.Add(LibPrefix + "libclient" + LibPostfixAndExt);
if (Target.Platform != UnrealTargetPlatform.Win64 && Target.Platform != UnrealTargetPlatform.Mac)
{
PublicAdditionalLibraries.Add(LibPrefix + "libp4sslstub" + LibPostfixAndExt);
}
PublicAdditionalLibraries.Add(LibPrefix + "librpc" + LibPostfixAndExt);
PublicAdditionalLibraries.Add(LibPrefix + "libsupp" + LibPostfixAndExt);
}
}
}