Files
UnrealEngine/Engine/Source/ThirdParty/Windows/PIX/WinPixEventRuntime.Build.cs
2025-05-18 13:04:45 +08:00

39 lines
1.4 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class WinPixEventRuntime : ModuleRules
{
public WinPixEventRuntime(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
{
string ThirdPartyDir = Path.Combine(Target.UEThirdPartySourceDirectory, "Windows", "PIX");
string IncludeDir = Path.Combine(ThirdPartyDir, "include");
string LibrariesDir = Path.Combine(ThirdPartyDir, "Lib", Target.Architecture.WindowsLibDir);
string BinariesDir = Path.Combine("$(EngineDir)", "Binaries", "ThirdParty", "Windows", "WinPixEventRuntime", Target.Architecture.WindowsLibDir);
string BinaryBaseName = "WinPixEventRuntime";
string WinPixDll = BinaryBaseName + ".dll";
string WinPixLib = BinaryBaseName + ".lib";
PublicDefinitions.Add("WITH_PIX_EVENT_RUNTIME=1");
PublicSystemIncludePaths.Add(IncludeDir);
PublicAdditionalLibraries.Add(Path.Combine(LibrariesDir, WinPixLib));
RuntimeDependencies.Add(Path.Combine(BinariesDir, WinPixDll));
PublicDelayLoadDLLs.Add(WinPixDll);
// see pixeventscommon.h - MSVC has no support for __has_feature(address_sanitizer) so need to define this manually
if (Target.WindowsPlatform.Compiler != WindowsCompiler.Clang && Target.WindowsPlatform.bEnableAddressSanitizer)
{
PublicDefinitions.Add("PIX_ENABLE_BLOCK_ARGUMENT_COPY=0");
}
}
}
}