Files
UnrealEngineUWP/Engine/Source/Developer/TargetPlatform/TargetPlatform.Build.cs
Josh Adams ccc1743281 - Big TargetPlatform Module cleanup:
- Removed the function to return a single TP, and wrapped the functionality in a simple single required function (platform just has to add TPs to an array, high level code manages init and cleanup of the array)
  - Stripped unncessary code from all TPs
  - Collapsed the desktop targetplatform modules into 1 per platform
  - Renamed LinuxAArch64NoEditorTargetPlatfortm to LinuxAArch64TargetPlatform to match the other non-editor platforms
  - Deleted AllDesktopPlatform

[CL 13502803 by Josh Adams in ue5-main branch]
2020-05-22 09:57:29 -04:00

115 lines
4.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class TargetPlatform : ModuleRules
{
public TargetPlatform(ReadOnlyTargetRules Target) : base(Target)
{
PrivateDependencyModuleNames.Add("Core");
PrivateDependencyModuleNames.Add("SlateCore");
PrivateDependencyModuleNames.Add("Slate");
PrivateDependencyModuleNames.Add("EditorStyle");
PrivateDependencyModuleNames.Add("Projects");
PublicDependencyModuleNames.Add("AudioPlatformConfiguration");
PublicDependencyModuleNames.Add("DesktopPlatform");
PublicDependencyModuleNames.Add("LauncherPlatform");
PrivateIncludePathModuleNames.Add("Engine");
PrivateIncludePathModuleNames.Add("PhysicsCore");
// no need for all these modules if the program doesn't want developer tools at all (like UnrealFileServer)
if (!Target.bBuildRequiresCookedData && Target.bBuildDeveloperTools)
{
// these are needed by multiple platform specific target platforms, so we make sure they are built with the base editor
DynamicallyLoadedModuleNames.Add("ShaderPreprocessor");
DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
DynamicallyLoadedModuleNames.Add("ShaderFormatVectorVM");
DynamicallyLoadedModuleNames.Add("ImageWrapper");
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
{
DynamicallyLoadedModuleNames.Add("TextureFormatIntelISPCTexComp");
}
if (Target.Platform == UnrealTargetPlatform.Win32 ||
Target.Platform == UnrealTargetPlatform.Win64)
{
// these are needed by multiple platform specific target platforms, so we make sure they are built with the base editor
DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
DynamicallyLoadedModuleNames.Add("MetalShaderFormat");
DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
DynamicallyLoadedModuleNames.Add("TextureFormatUncompressed");
if (Target.bCompileAgainstEngine)
{
DynamicallyLoadedModuleNames.Add("AudioFormatADPCM"); // For IOS cooking
DynamicallyLoadedModuleNames.Add("AudioFormatOgg");
DynamicallyLoadedModuleNames.Add("AudioFormatOpus");
}
if (Target.Type == TargetType.Editor || Target.Type == TargetType.Program)
{
DynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
DynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
DynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
DynamicallyLoadedModuleNames.Add("MacTargetPlatform");
}
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
DynamicallyLoadedModuleNames.Add("TextureFormatUncompressed");
if (Target.bCompileAgainstEngine)
{
DynamicallyLoadedModuleNames.Add("AudioFormatOgg");
DynamicallyLoadedModuleNames.Add("AudioFormatOpus");
DynamicallyLoadedModuleNames.Add("AudioFormatADPCM");
}
if (Target.Type == TargetType.Editor || Target.Type == TargetType.Program)
{
DynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
DynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
DynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
}
}
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Linux))
{
DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
DynamicallyLoadedModuleNames.Add("TextureFormatUncompressed");
if (Target.bCompileAgainstEngine)
{
DynamicallyLoadedModuleNames.Add("AudioFormatOgg");
DynamicallyLoadedModuleNames.Add("AudioFormatOpus");
DynamicallyLoadedModuleNames.Add("AudioFormatADPCM");
}
if (Target.Type == TargetType.Editor || Target.Type == TargetType.Program)
{
DynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
}
}
}
if (Target.bBuildDeveloperTools == true && Target.bBuildRequiresCookedData && Target.bCompileAgainstEngine && Target.bCompilePhysX)
{
DynamicallyLoadedModuleNames.Add("PhysXCooking");
}
}
}