From 2415f5df72265afb368d5189b91cbe6242da4e5f Mon Sep 17 00:00:00 2001 From: Grigoriy Date: Mon, 12 Mar 2018 00:30:49 +0300 Subject: First commit --- Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs | 102 ++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs (limited to 'Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs') diff --git a/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs b/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs new file mode 100644 index 0000000..30e3125 --- /dev/null +++ b/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs @@ -0,0 +1,102 @@ +// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. + +using System.IO; + +namespace UnrealBuildTool.Rules +{ + public class NVIDIAGfeSDK : ModuleRules + { + private string ModulePath + { + get { return ModuleDirectory; } + } + + private string ThirdPartyPath + { + get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); } + } + + private string BinariesPath + { + get { return Path.GetFullPath(Path.Combine(ThirdPartyPath, "NVIDIAGfeSDK", "redist")); } + } + + private string LibraryPath + { + get { return Path.GetFullPath(Path.Combine(ThirdPartyPath, "NVIDIAGfeSDK", "lib")); } + } + + public NVIDIAGfeSDK(ReadOnlyTargetRules Target) : base(Target) + { + PublicIncludePaths.AddRange( + new string[] { + "NVIDIAGfeSDK/Public", + ThirdPartyPath + "NVIDIAGfeSDK/Include", + ThirdPartyPath + "NVIDIAGfeSDK/Include/gfesdk", + // ... add public include paths required here ... + } + ); + + PrivateIncludePaths.AddRange( + new string[] { + "NVIDIAGfeSDK/Private", + //Path.Combine(ThirdPartyPath, "NVIDIAGfeSDK", "Include"), + ThirdPartyPath + "NVIDIAGfeSDK/Include", + ThirdPartyPath + "NVIDIAGfeSDK/Include/gfesdk", + // ... add other private include paths required here ... + } + ); + + PublicDependencyModuleNames.AddRange( + new string[] + { + "Engine", + "Core", + "CoreUObject" + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + // ... add private dependencies that you statically link with here ... + } + ); + + DynamicallyLoadedModuleNames.AddRange( + new string[] + { + // ... add any modules that your module loads dynamically here ... + } + ); + + LoadNVIDIAGfeSDKLib(Target); + } + + public bool LoadNVIDIAGfeSDKLib(ReadOnlyTargetRules Target) + { + bool isLibrarySupported = false; + + if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) + { + isLibrarySupported = true; + + string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64" : "Win32"; + + string DllPath = Path.Combine(BinariesPath, PlatformString); + string LibFullPath = Path.Combine(LibraryPath, PlatformString); + + string DllName = Path.Combine(DllPath, "GfeSDK.dll"); + string LibFilePath = Path.Combine(LibFullPath, "GfeSDK.lib"); + + PublicLibraryPaths.Add(LibFullPath); + PublicAdditionalLibraries.Add("GfeSDK.lib"); + + PublicDelayLoadDLLs.Add("GfeSDK.dll"); + RuntimeDependencies.Add(new RuntimeDependency(DllName)); + } + + return isLibrarySupported; + } + } +} -- cgit v1.2.3