Files
david harvey 916805a126 Adding a module groups attribute for module rules.
Expected usage:

```
[ModuleGroups("MyGroup"]
public class MyModule : ModuleRules {... }

public class MyOtherModule : ModuleRules
{
    ...
    PrivateDependencyModuleNames.AddRange( GetModulesInGroup("MyGroup") );
}
```

#rnx
#rb Josh.Adams

[CL 29270167 by david harvey in ue5-main branch]
2023-10-31 06:32:45 -04:00

31 lines
809 B
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
namespace UnrealBuildTool
{
#nullable enable
/// <summary>
/// Attribute which can be applied to a ModuleRules-dervied class to indicate which module groups it belongs to
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ModuleGroupsAttribute : Attribute
{
/// <summary>
/// Array of module group names
/// </summary>
public readonly string[] ModuleGroups;
/// <summary>
/// Initialize the attribute with a list of module groups
/// </summary>
/// <param name="ModuleGroups">Variable-length array of module group arguments</param>
public ModuleGroupsAttribute(params string[] ModuleGroups)
{
this.ModuleGroups = ModuleGroups;
}
}
}