2019-12-26 23:01:54 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-05-24 11:51:54 -04:00
|
|
|
|
2020-12-21 23:07:37 -04:00
|
|
|
using EpicGames.Core;
|
2019-05-24 11:51:54 -04:00
|
|
|
|
|
|
|
|
namespace UnrealBuildTool
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stores information about where a module rules object came from, and how it can be used.
|
|
|
|
|
/// </summary>
|
|
|
|
|
class ModuleRulesContext
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The scope for this module. Used to validate references to other modules.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public RulesScope Scope;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The default directory for output files
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DirectoryReference DefaultOutputBaseDir;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The plugin that this module belongs to
|
|
|
|
|
/// </summary>
|
2020-12-20 18:47:42 -04:00
|
|
|
public PluginInfo? Plugin;
|
2019-05-24 11:51:54 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this module should be included in the default hot reload set
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool bCanHotReload;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this module should be compiled with optimization disabled in DebugGame configurations (ie. whether it's a game module).
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool bCanBuildDebugGame;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this module can be used for generating shared PCHs
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool bCanUseForSharedPCH;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to treat this module as a game module for UHT ordering
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool bClassifyAsGameModuleForUHT;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The default module type for UnrealHeaderTool. Do not use this for inferring other things about the module.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public UHTModuleType? DefaultUHTModuleType;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Constructor
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModuleRulesContext(RulesScope Scope, DirectoryReference DefaultOutputBaseDir)
|
|
|
|
|
{
|
|
|
|
|
this.Scope = Scope;
|
|
|
|
|
this.DefaultOutputBaseDir = DefaultOutputBaseDir;
|
2023-05-30 18:59:32 -04:00
|
|
|
bCanUseForSharedPCH = true;
|
2019-05-24 11:51:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Copy constructor
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Other">The context to copy from</param>
|
|
|
|
|
public ModuleRulesContext(ModuleRulesContext Other)
|
|
|
|
|
{
|
2023-05-30 18:59:32 -04:00
|
|
|
Scope = Other.Scope;
|
|
|
|
|
DefaultOutputBaseDir = Other.DefaultOutputBaseDir;
|
|
|
|
|
Plugin = Other.Plugin;
|
|
|
|
|
bCanHotReload = Other.bCanHotReload;
|
|
|
|
|
bCanBuildDebugGame = Other.bCanBuildDebugGame;
|
|
|
|
|
bCanUseForSharedPCH = Other.bCanUseForSharedPCH;
|
|
|
|
|
bClassifyAsGameModuleForUHT = Other.bClassifyAsGameModuleForUHT;
|
|
|
|
|
DefaultUHTModuleType = Other.DefaultUHTModuleType;
|
2019-05-24 11:51:54 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|