You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
NeuralNetworkInference plugin: Fixing DmlDefault.Build.cs #preflight 62718aaa3e1f2a9d3a30cbb0 [CL 20031710 by francisco vicente in ue5-main branch]
59 lines
1.7 KiB
C#
59 lines
1.7 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using UnrealBuildTool;
|
|
|
|
public class DirectMLDefault : ModuleRules
|
|
{
|
|
public DirectMLDefault(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
Type = ModuleType.External;
|
|
// Win64
|
|
if (Target.Platform == UnrealTargetPlatform.Win64)
|
|
{
|
|
// PublicSystemIncludePaths
|
|
string IncPath = Path.Combine(ModuleDirectory, "include/");
|
|
PublicSystemIncludePaths.Add(IncPath);
|
|
// PublicAdditionalLibraries
|
|
string PlatformDir = Target.Platform.ToString();
|
|
string LibDirPath = Path.Combine(ModuleDirectory, "lib", PlatformDir);
|
|
string[] LibFileNames = new string[] {
|
|
"DirectML",
|
|
};
|
|
foreach(string LibFileName in LibFileNames)
|
|
{
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibDirPath, LibFileName + ".lib"));
|
|
}
|
|
// PublicDelayLoadDLLs
|
|
string DLLReleaseFileName = LibFileNames[0] + ".dll";
|
|
string DLLDebugFileName = LibFileNames[0] + ".Debug.dll";
|
|
|
|
bool ReleaseMode = true;
|
|
string DLLFileName;
|
|
|
|
if (ReleaseMode == true)
|
|
{
|
|
DLLFileName = DLLReleaseFileName;
|
|
}
|
|
else
|
|
{
|
|
DLLFileName = DLLDebugFileName;
|
|
}
|
|
|
|
PublicDelayLoadDLLs.Add(DLLFileName);
|
|
// RuntimeDependencies
|
|
string BinaryThirdPartyDirPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "bin", PlatformDir));
|
|
string DLLFullPath = Path.Combine(BinaryThirdPartyDirPath, DLLFileName);
|
|
RuntimeDependencies.Add(DLLFullPath);
|
|
|
|
// PublicDefinitions
|
|
PublicDefinitions.Add("DIRECTML_USE_DLLS");
|
|
PublicDefinitions.Add("WITH_DIRECTML");
|
|
PublicDefinitions.Add("DIRECTML_PLATFORM_PATH=bin/" + PlatformDir);
|
|
PublicDefinitions.Add("DIRECTML_DLL_NAME=" + DLLFileName);
|
|
}
|
|
|
|
}
|
|
}
|