Files
UnrealEngineUWP/Engine/Source/Programs/UnrealHeaderTool/UnrealHeaderTool.Target.cs
Ben Marsh 149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00

74 lines
2.4 KiB
C#

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class UnrealHeaderToolTarget : TargetRules
{
public UnrealHeaderToolTarget(TargetInfo Target)
{
Type = TargetType.Program;
AdditionalPlugins.Add("ScriptGeneratorPlugin");
}
//
// TargetRules interface.
//
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>() { "UnrealHeaderTool" } )
);
}
public override bool ShouldCompileMonolithic(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
{
if (UnrealBuildTool.UnrealBuildTool.CommandLineContains("-monolithic") == true)
{
return true;
}
// Don't build monolithic because we want plugin support
return false;
}
public override void SetupGlobalEnvironment(
TargetInfo Target,
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
)
{
// Lean and mean
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
// Never use malloc profiling in Unreal Header Tool. We set this because often UHT is compiled right before the engine
// automatically by Unreal Build Tool, but if bUseMallocProfiler is defined, UHT can operate incorrectly.
BuildConfiguration.bUseMallocProfiler = false;
// No editor needed
UEBuildConfiguration.bBuildEditor = false;
// Editor-only data, however, is needed
UEBuildConfiguration.bBuildWithEditorOnlyData = true;
// Currently this app is not linking against the engine, so we'll compile out references from Core to the rest of the engine
UEBuildConfiguration.bCompileAgainstEngine = false;
// Force execption handling across all modules.
UEBuildConfiguration.bForceEnableExceptions = true;
// Plugin support
UEBuildConfiguration.bCompileWithPluginSupport = true;
UEBuildConfiguration.bBuildDeveloperTools = true;
// UnrealHeaderTool is a console application, not a Windows app (sets entry point to main(), instead of WinMain())
OutLinkEnvironmentConfiguration.bIsBuildingConsoleApplication = true;
OutCPPEnvironmentConfiguration.Definitions.Add("HACK_HEADER_GENERATOR=1");
}
}