// Copyright 2017 Polymorph. All Rights Reserved.

using System.IO;
using UnrealBuildTool;

public class DinkeyPlugin : ModuleRules
{
	public DinkeyPlugin(ReadOnlyTargetRules Target) : base(Target)
	{
		PublicDependencyModuleNames.AddRange(new string[]
		{
			"Core",
			"Projects",
		});

		PrivateDependencyModuleNames.AddRange(new string[]
		{
			"CoreUObject",
			"Engine",
			"Slate",
			"SlateCore",
		});

		if (Target.Platform == UnrealTargetPlatform.Win64)
		{
			string ThirdPartyDir = Path.Combine(PluginDirectory, "Source", "ThirdParty", "DinkeyPro");

			PublicSystemIncludePaths.Add(Path.Combine(ThirdPartyDir, "Include"));
			PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyDir, "Lib", "Win64", "dpwin64.lib"));

			PublicDelayLoadDLLs.Add("dpwin64.dll");
			RuntimeDependencies.Add(
				Path.Combine(PluginDirectory, "Binaries", "ThirdParty", "DinkeyPro", "Win64", "dpwin64.dll"),
				StagedFileType.NonUFS);
		}
	}
}
