2020-02-12 13:27:19 -05:00
|
|
|
// 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;
|
|
|
|
|
|
UnrealArch/UnrealArchitectures changes
- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects
- UnrealArch is a single architecture, expandable enum-like struct
- There is no more concept of "no/default architecture", there is always a valid active architecture when building
- Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not
- UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc)
- UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm)
- TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once)
- Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc)
#preflight 63c81fb5b065224750a1759e
#rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts]
#p4v-preflight-copy 23562471
[CL 23829977 by josh adams in ue5-main branch]
2023-01-24 09:30:28 -05:00
|
|
|
if (Target.WindowsPlatform.Architecture == UnrealArch.Arm64 || Target.WindowsPlatform.Architecture == UnrealArch.X64)
|
2020-02-12 13:27:19 -05:00
|
|
|
{
|
2022-11-11 15:50:24 -05:00
|
|
|
string ThirdPartyDir = Path.Combine(Target.UEThirdPartySourceDirectory, "Windows", "PIX");
|
|
|
|
|
string IncludeDir = Path.Combine(ThirdPartyDir, "include");
|
|
|
|
|
string LibrariesDir = Path.Combine(ThirdPartyDir, "Lib", Target.WindowsPlatform.Architecture.ToString());
|
|
|
|
|
string BinariesDir = Path.Combine("$(EngineDir)", "Binaries", "ThirdParty", "Windows", "WinPixEventRuntime", Target.WindowsPlatform.Architecture.ToString());
|
2020-02-12 13:27:19 -05:00
|
|
|
|
UnrealArch/UnrealArchitectures changes
- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects
- UnrealArch is a single architecture, expandable enum-like struct
- There is no more concept of "no/default architecture", there is always a valid active architecture when building
- Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not
- UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc)
- UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm)
- TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once)
- Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc)
#preflight 63c81fb5b065224750a1759e
#rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts]
#p4v-preflight-copy 23562471
[CL 23829977 by josh adams in ue5-main branch]
2023-01-24 09:30:28 -05:00
|
|
|
string BinaryBaseName = Target.WindowsPlatform.Architecture == UnrealArch.Arm64 ? "WinPixEventRuntime_UAP" : "WinPixEventRuntime";
|
2022-11-11 15:50:24 -05:00
|
|
|
string WinPixDll = BinaryBaseName + ".dll";
|
|
|
|
|
string WinPixLib = BinaryBaseName + ".lib";
|
2022-10-26 13:04:12 -04:00
|
|
|
|
2021-04-06 21:54:21 -04:00
|
|
|
PublicDefinitions.Add("WITH_PIX_EVENT_RUNTIME=1");
|
2022-11-11 15:50:24 -05:00
|
|
|
|
|
|
|
|
PublicSystemIncludePaths.Add(IncludeDir);
|
|
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibrariesDir, WinPixLib));
|
|
|
|
|
RuntimeDependencies.Add(Path.Combine(BinariesDir, WinPixDll));
|
|
|
|
|
PublicDelayLoadDLLs.Add(WinPixDll);
|
2021-06-23 11:35:42 -04:00
|
|
|
|
|
|
|
|
// 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");
|
|
|
|
|
}
|
2020-02-12 13:27:19 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|