MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
McroWindows.Build.cs
Go to the documentation of this file.
1/** @noop License Comment
2 * @file
3 * @copyright
4 * This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5 * If a copy of the MPL was not distributed with this file You can obtain one at
6 * https://mozilla.org/MPL/2.0/
7 *
8 * @author David Mórász
9 * @date 2025
10 */
11
12using UnrealBuildTool;
13using McroBuild;
14
15/// <summary>
16/// A module containing Windows platform specific utilities like interop between Unreal and WinRT/COM
17/// </summary>
18public class McroWindows : ModuleRules
19{
20 public McroWindows(ReadOnlyTargetRules target) : base(target)
21 {
22 if (target.Platform != UnrealTargetPlatform.Win64)
23 {
24 Type = ModuleType.External;
25 return;
26 }
27
28 // C++23
29 bUseUnity = false;
30 CppStandard = CppStandardVersion.Latest;
31 bEnableExceptions = true;
32
33 PublicDependencyModuleNames.AddRange(new[]
34 {
35 "Core",
36 "RHI",
37 "D3D11RHI",
38 "D3D12RHI",
39
40 "Mcro",
41 });
42
43 PrivateDependencyModuleNames.AddRange(new[]
44 {
45 "CoreUObject",
46 "Engine",
47 });
48
49 PublicSystemLibraries.AddRange(new[]
50 {
51 "WindowsApp.lib",
52 "shlwapi.lib",
53 "runtimeobject.lib",
54 "comsuppw.lib",
55 "dxgi.lib",
56 "d3d11.lib",
57 "d3d12.lib"
58 });
59
60 AddEngineThirdPartyPrivateStaticDependencies(target, "DX12");
61
62 PublicIncludePaths.AddRange(new[]
63 {
64 $"{target.WindowsPlatform.WindowsSdkDir}/Include/{target.WindowsPlatform.WindowsSdkVersion}/cppwinrt"
65 });
66
67 if (target.Configuration <= UnrealTargetConfiguration.DebugGame)
68 {
69 PublicDefinitions.AddRange(new[]
70 {
71 "WINRT_NATVIS=1"
72 });
73 }
74
75 if (target.Type == TargetType.Editor)
76 {
77 PrivateDependencyModuleNames.AddRange(new[]
78 {
79 "UnrealEd"
80 });
81 }
82 }
83}
A module containing Windows platform specific utilities like interop between Unreal and WinRT/COM.
McroWindows(ReadOnlyTargetRules target)