2022-03-04 16:09:04 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using UnrealBuildTool;
|
|
|
|
|
|
2023-03-09 08:33:51 -05:00
|
|
|
public class DirectML : ModuleRules
|
2022-03-04 16:09:04 -05:00
|
|
|
{
|
2023-03-09 08:33:51 -05:00
|
|
|
public DirectML(ReadOnlyTargetRules Target) : base(Target)
|
2022-03-04 16:09:04 -05:00
|
|
|
{
|
|
|
|
|
Type = ModuleType.External;
|
2023-01-24 12:50:41 -05:00
|
|
|
|
|
|
|
|
string PlatformDir = Target.Platform.ToString();
|
|
|
|
|
string BinDirPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "bin", PlatformDir));
|
|
|
|
|
string LibDirPath = Path.Combine(ModuleDirectory, "lib", PlatformDir);
|
|
|
|
|
string IncDirPath = Path.Combine(ModuleDirectory, "include/");
|
|
|
|
|
string LibFileName = "DirectML";
|
|
|
|
|
string DllFileName = LibFileName + ".dll";
|
|
|
|
|
string DllFullPath = Path.Combine(BinDirPath, DllFileName);
|
|
|
|
|
string DbgDllFileName = LibFileName + ".Debug.dll";
|
|
|
|
|
string DbgDllFullPath = Path.Combine(BinDirPath, DbgDllFileName);
|
|
|
|
|
|
2022-03-04 16:09:04 -05:00
|
|
|
// Win64
|
|
|
|
|
if (Target.Platform == UnrealTargetPlatform.Win64)
|
|
|
|
|
{
|
2023-01-24 12:50:41 -05:00
|
|
|
PublicSystemIncludePaths.Add(IncDirPath);
|
2022-07-04 12:00:24 -04:00
|
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibDirPath, LibFileName + ".lib"));
|
2023-01-24 12:50:41 -05:00
|
|
|
PublicDelayLoadDLLs.Add(DllFileName);
|
|
|
|
|
RuntimeDependencies.Add("$(TargetOutputDir)/DML/" + DllFileName, DllFullPath);
|
2022-07-04 12:00:24 -04:00
|
|
|
|
2023-03-23 07:00:30 -04:00
|
|
|
PublicDefinitions.Add("DML_TARGET_VERSION=0x5100");
|
2023-01-24 13:38:29 -05:00
|
|
|
PublicDefinitions.Add("WITH_DIRECTML");
|
2023-01-24 12:50:41 -05:00
|
|
|
PublicDefinitions.Add("DIRECTML_PATH=DML");
|
|
|
|
|
|
|
|
|
|
if (Target.Configuration != UnrealTargetConfiguration.Shipping &&
|
|
|
|
|
Target.Configuration != UnrealTargetConfiguration.Test)
|
|
|
|
|
{
|
2023-01-24 13:38:29 -05:00
|
|
|
PublicDefinitions.Add("WITH_DIRECTML_DEBUG");
|
2023-01-24 12:50:41 -05:00
|
|
|
PublicDelayLoadDLLs.Add(DllFileName);
|
|
|
|
|
RuntimeDependencies.Add("$(TargetOutputDir)/DML/" + DbgDllFileName, DbgDllFullPath);
|
|
|
|
|
}
|
2022-03-04 16:09:04 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|