// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. using UnrealBuildTool; using System.Collections.Generic; public class UE4ServerTarget : TargetRules { public UE4ServerTarget(TargetInfo Target) { Type = TargetType.Server; bOutputToEngineBinaries = true; } // // TargetRules interface. // public override void SetupBinaries( TargetInfo Target, ref List OutBuildBinaryConfigurations, ref List OutExtraModuleNames ) { base.SetupBinaries(Target, ref OutBuildBinaryConfigurations, ref OutExtraModuleNames); OutExtraModuleNames.Add("UE4Game"); } public override void SetupGlobalEnvironment( TargetInfo Target, ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration ) { } public override bool ShouldUseSharedBuildEnvironment(TargetInfo Target) { return true; } public override bool GetSupportedPlatforms(ref List OutPlatforms) { // It is valid for only server platforms return UnrealBuildTool.UnrealBuildTool.GetAllServerPlatforms(ref OutPlatforms, false); } public override void GetModulesToPrecompile(TargetInfo Target, List ModuleNames) { // Add all the precompiled modules for this target ModuleNames.Add("Launch"); ModuleNames.Add("GameplayAbilities"); ModuleNames.Add("XmlParser"); ModuleNames.Add("GameplayDebugger"); ModuleNames.Add("RuntimeAssetCache"); ModuleNames.Add("UnrealCodeAnalyzerTests"); ModuleNames.Add("OnlineSubsystemNull"); ModuleNames.Add("OnlineSubsystemAmazon"); if (UEBuildConfiguration.bCompileSteamOSS == true) { ModuleNames.Add("OnlineSubsystemSteam"); } ModuleNames.Add("OnlineSubsystemNull"); } public override List GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform) { List Platforms = null; switch(HostPlatform) { case UnrealTargetPlatform.Linux: Platforms = new List { HostPlatform }; break; case UnrealTargetPlatform.Win64: Platforms = new List { HostPlatform, UnrealTargetPlatform.Win32, UnrealTargetPlatform.Linux }; break; default: Platforms = new List(); break; } return Platforms; } public override List GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform) { return new List { UnrealTargetConfiguration.Development }; } }