Files
UnrealEngineUWP/Engine/Source/ThirdParty/OpenVR/OpenVR.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

56 lines
1.8 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.IO;
using UnrealBuildTool;
public class OpenVR : ModuleRules
{
public OpenVR(ReadOnlyTargetRules Target) : base(Target)
{
/** Mark the current version of the OpenVR SDK */
string OpenVRVersion = "v1_5_17";
Type = ModuleType.External;
string SdkBase = Target.UEThirdPartySourceDirectory + "OpenVR/OpenVR" + OpenVRVersion;
if (!Directory.Exists(SdkBase))
{
string Err = string.Format("OpenVR SDK not found in {0}", SdkBase);
System.Console.WriteLine(Err);
throw new BuildException(Err);
}
PublicSystemIncludePaths.Add(SdkBase + "/headers");
string LibraryPath = SdkBase + "/lib/";
if(Target.Platform == UnrealTargetPlatform.Win64)
{
LibraryPath += "win64/";
PublicAdditionalLibraries.Add(LibraryPath + "openvr_api.lib");
PublicDelayLoadDLLs.Add("openvr_api.dll");
string OpenVRBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/OpenVR/OpenVR{0}/Win64/", OpenVRVersion);
RuntimeDependencies.Add(OpenVRBinariesDir + "openvr_api.dll");
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
string DylibPath = Target.UEThirdPartyBinariesDirectory + "OpenVR/OpenVR" + OpenVRVersion + "/osx32/libopenvr_api.dylib";
PublicDelayLoadDLLs.Add(DylibPath);
RuntimeDependencies.Add(DylibPath);
}
else if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture == UnrealArch.X64)
{
LibraryPath += "linux64/";
PublicAdditionalLibraries.Add(LibraryPath + "libopenvr_api.so");
string DylibDir = Target.UEThirdPartyBinariesDirectory + "OpenVR/OpenVR" + OpenVRVersion + "/linux64";
PrivateRuntimeLibraryPaths.Add(DylibDir);
string DylibPath = DylibDir + "/libopenvr_api.so";
PublicDelayLoadDLLs.Add(DylibPath);
RuntimeDependencies.Add(DylibPath);
}
}
}