Files
UnrealEngineUWP/Engine/Source/ThirdParty/Perforce/Perforce.Build.cs
Matthew Griffin ccd90b10b4 Listing runtime dependencies in module rules instead of InstalledEngineFilters.ini
Added code when filtering rocket files to search through build products for target files and add their runtime dependencies to the filter rules.

#jira UEB-372

[CL 2672116 by Matthew Griffin in Main branch]
2015-08-28 06:22:07 -04:00

84 lines
3.3 KiB
C#

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class Perforce : ModuleRules
{
public Perforce(TargetInfo Target)
{
Type = ModuleType.External;
string LibFolder = "lib/";
string LibPrefix = "";
string LibPostfixAndExt = ".";
string P4APIPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Perforce/p4api-2012.1/";
if (Target.Platform == UnrealTargetPlatform.Win64)
{
LibFolder += "win64";
}
else if (Target.Platform == UnrealTargetPlatform.Win32)
{
LibFolder += "win32";
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
P4APIPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Perforce/p4api-2014.1/";
LibFolder += "mac";
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
P4APIPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Perforce/p4api-2014.1/" ;
LibFolder += "linux/" + Target.Architecture;
}
if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
{
if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
LibPostfixAndExt = "d.";
if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)
{
P4APIPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Perforce/p4api-2015.1/";
}
else if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2013)
{
P4APIPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Perforce/p4api-2014.2/";
}
else
{
P4APIPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Perforce/p4api-2013.1-BETA/";
}
LibPostfixAndExt += "lib";
PublicLibraryPaths.Add(P4APIPath + LibFolder);
RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Perforce/p4api.dll"));
RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Perforce/p4api.xml"));
}
else
{
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);
// VS2015 updated some of the CRT definitions but not all of the Windows SDK has been updated to match.
// Microsoft provides this shim library to enable building with VS2015 until they fix everything up.
//@todo: remove when no longer neeeded (no other code changes should be necessary).
// if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)
// {
// PublicAdditionalLibraries.Add("legacy_stdio_definitions.lib");
// }
}
}