Files
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

63 lines
2.2 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class SpeedTree : ModuleRules
{
public SpeedTree(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
var bPlatformAllowed = ((Target.Platform == UnrealTargetPlatform.Win64) ||
(Target.Platform == UnrealTargetPlatform.Mac) || Target.IsInPlatformGroup(UnrealPlatformGroup.Unix));
if (bPlatformAllowed &&
Target.bCompileSpeedTree)
{
PublicDefinitions.Add("WITH_SPEEDTREE=1");
PublicDefinitions.Add("SPEEDTREE_KEY=INSERT_KEY_HERE");
string SpeedTreePath = Target.UEThirdPartySourceDirectory + "SpeedTree/SpeedTreeSDK-v7.0/";
PublicSystemIncludePaths.Add(SpeedTreePath + "Include");
string SpeedTree8Path = Target.UEThirdPartySourceDirectory + "SpeedTree/SpeedTreeDataBuffer/";
PublicSystemIncludePaths.Add(SpeedTree8Path);
if (Target.Platform == UnrealTargetPlatform.Win64)
{
if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
{
PublicAdditionalLibraries.Add(SpeedTreePath + "Lib/Windows/VC14.x64/SpeedTreeCore_Windows_v7.0_VC14_MTDLL64_Static_d.lib");
}
else
{
PublicAdditionalLibraries.Add(SpeedTreePath + "Lib/Windows/VC14.x64/SpeedTreeCore_Windows_v7.0_VC14_MTDLL64_Static.lib");
}
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
{
PublicAdditionalLibraries.Add(SpeedTreePath + "Lib/MacOSX/Debug/libSpeedTreeCore.a");
}
else
{
PublicAdditionalLibraries.Add(SpeedTreePath + "Lib/MacOSX/Release/libSpeedTreeCore.a");
}
}
else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
{
if (Target.LinkType == TargetLinkType.Monolithic)
{
PublicAdditionalLibraries.Add(SpeedTreePath + "Lib/Linux/" + Target.Architecture.LinuxName + "/Release/libSpeedTreeCore.a");
}
else
{
PublicAdditionalLibraries.Add(SpeedTreePath + "Lib/Linux/" + Target.Architecture.LinuxName + "/Release/libSpeedTreeCore_fPIC.a");
}
}
}
}
}