Files
UnrealEngineUWP/Engine/Source/Programs/UnrealCEFSubProcess/UnrealCEFSubProcess.Target.cs
Matthew Griffin fef7e15bce Adding WebBrowser Developer project
Web Browser project mostly exposes interfaces, hiding all of the CEF3 implementation and technically allowing us to slot in another web system if necessary. Normal process will be to request a browser window interface from the web browser singleton. There is also an implementation of ISlateViewport so that it can be displayed via an SViewport.
The UnrealCEFSubProcess executable is needed for CEF3 to run additional processes for rendering etc. I don't expect this to change very often so it should hopefully just be built once and distributed, since we can't currently specify a program dependency for other modules.
Added a CEF3Utils project to share .dll loading code between web browser and the separate sub process executable.

[CL 2317298 by Matthew Griffin in Main branch]
2014-10-02 10:53:05 -04:00

83 lines
2.6 KiB
C#

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using System.Collections.Generic;
using System.IO;
using UnrealBuildTool;
public class UnrealCEFSubProcessTarget : TargetRules
{
public UnrealCEFSubProcessTarget(TargetInfo Target)
{
Type = TargetType.Program;
}
//
// TargetRules interface.
//
public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms)
{
OutPlatforms.Add(UnrealTargetPlatform.Win64);
OutPlatforms.Add(UnrealTargetPlatform.Mac);
OutPlatforms.Add(UnrealTargetPlatform.Linux);
return true;
}
public override bool ShouldCompileMonolithic(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
{
return true;
}
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>() { "UnrealCEFSubProcess" })
);
}
public override void SetupGlobalEnvironment(
TargetInfo Target,
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
)
{
// Turn off various third party features we don't need
// Currently we force Lean and Mean mode
UEBuildConfiguration.bCompileLeanAndMeanUE = 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;
UEBuildConfiguration.bCompileAgainstCoreUObject = false;
UEBuildConfiguration.bBuildWithEditorOnlyData = true;
// Never use malloc profiling in CEFSubProcess.
BuildConfiguration.bUseMallocProfiler = false;
// Force all shader formats to be built and included.
//UEBuildConfiguration.bForceBuildShaderFormats = true;
// CEFSubProcess is a console application, not a Windows app (sets entry point to main(), instead of WinMain())
OutLinkEnvironmentConfiguration.bIsBuildingConsoleApplication = false;
// Do NOT produce additional console app exe
OutLinkEnvironmentConfiguration.bBuildAdditionalConsoleApplication = false;
// Disable logging, as the sub processes are spawned often and logging will just slow them down
OutCPPEnvironmentConfiguration.Definitions.Add("ALLOW_LOG_FILE=0");
}
public override bool GUBP_AlwaysBuildWithBaseEditor()
{
return true;
}
public override bool GUBP_NeedsPlatformSpecificDLLs()
{
return true;
}
}