Created
July 14, 2017 17:37
-
-
Save SammyJames/4f6dbea80430689517cee868f8e0a425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnrealBuildTool; | |
using System.Collections.Generic; | |
public class RantTarget : TargetRules | |
{ | |
public RantTarget(TargetInfo Target) | |
{ | |
Type = TargetType.Program; | |
} | |
// | |
// TargetRules interface. | |
// | |
public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms) | |
{ | |
if (UnrealBuildTool.UnrealBuildTool.GetAllDesktopPlatforms(ref OutPlatforms, false) == true) | |
{ | |
OutPlatforms.Add(UnrealTargetPlatform.IOS); | |
return true; | |
} | |
return false; | |
} | |
public override void SetupBinaries( | |
TargetInfo Target, | |
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations, | |
ref List<string> OutExtraModuleNames | |
) | |
{ | |
OutBuildBinaryConfigurations.Add( | |
new UEBuildBinaryConfiguration( InType: UEBuildBinaryType.Executable, | |
InModuleNames: new List<string>() { "Rant" } ) | |
); | |
OutExtraModuleNames.Add("EditorStyle"); | |
} | |
public override bool ShouldCompileMonolithic(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration) | |
{ | |
return true; | |
} | |
public override void SetupGlobalEnvironment( | |
TargetInfo Target, | |
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, | |
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration | |
) | |
{ | |
UEBuildConfiguration.bCompileLeanAndMeanUE = true; | |
// Don't need editor | |
UEBuildConfiguration.bBuildEditor = false; | |
// SlateViewer doesn't ever compile with the engine linked in | |
UEBuildConfiguration.bCompileAgainstEngine = false; | |
// We need CoreUObject compiled in as the source code access module requires it | |
UEBuildConfiguration.bCompileAgainstCoreUObject = true; | |
// SlateViewer.exe has no exports, so no need to verify that a .lib and .exp file was emitted by | |
// the linker. | |
OutLinkEnvironmentConfiguration.bHasExports = false; | |
// Do NOT produce additional console app exe | |
OutLinkEnvironmentConfiguration.bBuildAdditionalConsoleApplication = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment