You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
5a985f8552
#rnx #jira UE-183355 #rb brandon.schaefer #preflight none [CL 25074693 by ryan hummer in ue5-main branch]
58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using UnrealBuildTool;
|
|
using UnrealBuildBase;
|
|
using System.IO;
|
|
|
|
public class NVML : ModuleRules
|
|
{
|
|
private string ProjectBinariesDir
|
|
{
|
|
get
|
|
{
|
|
return "$(TargetOutputDir)";
|
|
}
|
|
}
|
|
|
|
public NVML(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
Type = ModuleType.External;
|
|
|
|
string PublicPath = Path.Combine(ModuleDirectory, "Public");
|
|
|
|
PublicSystemIncludePaths.Add(PublicPath);
|
|
|
|
string DllName = "";
|
|
string DllPath = "";
|
|
|
|
string ConfigFolder = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" : "Release";
|
|
string Platform = Target.Platform.ToString();
|
|
if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architectures.Contains(UnrealArch.X64))
|
|
{
|
|
string Architecture = UnrealArch.X64.LinuxName;
|
|
DllPath = $"{ModuleDirectory}/Binaries/{Platform}/{Architecture}/{ConfigFolder}/";
|
|
DllName = "libNvmlWrapper.so";
|
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(DllPath, DllName));
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Win64)
|
|
{
|
|
DllPath = $"{ModuleDirectory}/Binaries/{Platform}/{ConfigFolder}/";
|
|
DllName = "NvmlWrapper.dll";
|
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(DllPath, "NvmlWrapper.lib"));
|
|
}
|
|
|
|
if (DllName != "")
|
|
{
|
|
RuntimeDependencies.Add(
|
|
Path.Combine(ProjectBinariesDir, DllName),
|
|
Path.Combine(DllPath, DllName),
|
|
StagedFileType.NonUFS);
|
|
|
|
PublicRuntimeLibraryPaths.Add(ProjectBinariesDir);
|
|
PublicDelayLoadDLLs.Add(DllName);
|
|
}
|
|
}
|
|
}
|