Files
UnrealEngineUWP/Engine/Source/ThirdParty/Intel/Embree/Embree3.Build.cs
josh adams 1610c3bee3 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

65 lines
2.7 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
using System.Collections.Generic;
public class Embree3 : ModuleRules
{
public Embree3(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
// EMBREE
if (Target.Platform == UnrealTargetPlatform.Win64)
{
string SDKDir = Target.UEThirdPartySourceDirectory + "Intel/Embree/Embree3122/Win64/";
PublicSystemIncludePaths.Add(SDKDir + "include");
PublicAdditionalLibraries.Add(SDKDir + "lib/embree3.lib");
PublicAdditionalLibraries.Add(SDKDir + "lib/tbb.lib");
RuntimeDependencies.Add("$(TargetOutputDir)/embree3.dll", SDKDir + "lib/embree3.dll");
RuntimeDependencies.Add("$(TargetOutputDir)/tbb12.dll", SDKDir + "lib/tbb12.dll");
PublicDelayLoadDLLs.Add("embree3.dll");
PublicDelayLoadDLLs.Add("tbb12.dll");
PublicDefinitions.Add("USE_EMBREE=1");
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
string SDKDir = Target.UEThirdPartySourceDirectory + "Intel/Embree/Embree3122/MacOSX/";
string LibDir = Path.Combine(SDKDir, "lib");
PublicSystemIncludePaths.Add(Path.Combine(SDKDir, "include"));
PublicAdditionalLibraries.Add(Path.Combine(LibDir, "libembree3.3.dylib"));
RuntimeDependencies.Add("$(TargetOutputDir)/libembree3.3.dylib", Path.Combine(LibDir, "libembree3.3.dylib"));
if (Target.Architectures.Contains(UnrealArch.X64))
{
string DylibPath = Path.Combine(LibDir, "libtbb.12.dylib");
PublicAdditionalLibraries.Add(DylibPath);
// we don't want to linnk this on arm64, as the embree dylib has it statically linked in
DependenciesToSkipPerArchitecture[Path.GetFullPath(DylibPath)] = new List<UnrealArch>() { UnrealArch.Arm64 };
RuntimeDependencies.Add("$(TargetOutputDir)/libtbb.12.dylib", Path.Combine(LibDir, "libtbb.12.dylib"));
}
PublicDefinitions.Add("USE_EMBREE=1");
}
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix) && Target.Architecture == UnrealArch.X64) // no support for arm64 yet
{
string IntelEmbreeLibs = Target.UEThirdPartyBinariesDirectory + "Intel/Embree/Embree3122";
string IncludeDir = Target.UEThirdPartySourceDirectory + "Intel/Embree/Embree3122/Linux/x86_64-unknown-linux-gnu";
string SDKDir = Path.Combine(IntelEmbreeLibs, "Linux/x86_64-unknown-linux-gnu/lib");
PublicSystemIncludePaths.Add(Path.Combine(IncludeDir, "include"));
PublicAdditionalLibraries.Add(Path.Combine(SDKDir, "libembree3.so"));
RuntimeDependencies.Add(Path.Combine(SDKDir, "libembree3.so"));
RuntimeDependencies.Add(Path.Combine(SDKDir, "libembree3.so.3"));
PublicDefinitions.Add("USE_EMBREE=1");
}
else
{
PublicDefinitions.Add("USE_EMBREE=0");
}
}
}