Files
UnrealEngineUWP/Engine/Source/Programs/SlateViewer/SlateViewer.Target.cs
Thomas Sarkanen 3522037b79 Source code access now works in SlateViewer and Launcher
Made sure to manually load the appropriate modules for source code access.
The hot reload dependency that VisualStudioSourceCodeAccess had was bringing in the whole editor as a dependency, so this is now restricted to editor builds.
SlateViewer now compiles in CoreUObject as the source code accessor module requires it for its settings.

TTP# 333675 - CHECKIN: SLATE: WidgetReflector code reference hyperlinks don't work anymore

#codereview Nick.Atamas,Frank.Fella

[CL 2292278 by Thomas Sarkanen in Main branch]
2014-09-10 06:43:48 -04:00

72 lines
2.0 KiB
C#

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class SlateViewerTarget : TargetRules
{
public SlateViewerTarget(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>() { "SlateViewer" } )
);
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;
}
}