// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.

using System.IO;
using UnrealBuildTool;

public class PokktAds : ModuleRules
{
	public PokktAds(TargetInfo Target)
	{
		
		PublicIncludePaths.AddRange(
			new string[]
            {
				"PokktAds/Public"
			}
		);
        
        if (Target.Platform == UnrealTargetPlatform.IOS)
        {
//            PublicIncludePaths.Add("PokktAds/iOSMediation");
        }
				
		
		PrivateIncludePaths.AddRange(
			new string[]
			{
				"PokktAds/Private",
				"Developer/PokktAds/Private",
				"/Source/Runtime/Launch/Private",
				"../../../../Source/Runtime/Core/Private",
				"../../../../Source/Runtime/Launch/Private",
				"../../../../Source/Runtime/Core/Private/Android",
				"../../../../Source/Runtime/Launch/Private/Android",
				// ... add other private include paths required here ...
			}
		);
        
        if (Target.Platform == UnrealTargetPlatform.IOS)
        {
//            PrivateIncludePaths.Add("PokktAds/iOSMediation");
        }
			
		
		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core",
				"Json",
				"JsonUtilities"
				// ... add other public dependencies that you statically link with here ...
			}
		);
			
		
		PrivateDependencyModuleNames.AddRange(
			new string[]
			{
				"CoreUObject",
				"Engine",
				// ... add private dependencies that you statically link with here ...	
			}
		);
		
		
		DynamicallyLoadedModuleNames.AddRange(
			new string[]
			{
				// ... add any modules that your module loads dynamically here ...
			}
		);
		
		
		PrivateIncludePathModuleNames.AddRange(
			new string[]
			{
				"Settings",
				"Launch",
			}
		);
		
		
		if (Target.Platform == UnrealTargetPlatform.IOS)
		{
            // POKKT
			var LibDir = Path.Combine(ModuleDirectory, "..", "..", "lib", "iOS", "pokkt");
			PrivateIncludePaths.Add(LibDir);

			PublicAdditionalLibraries.Add(Path.Combine(LibDir, "libPokktSDK_v7.6.0.a"));
            PublicAdditionalLibraries.Add("xml2");

//            // AppLovin
//            PublicAdditionalFrameworks.Add(
//                new UEBuildFramework(
//                    "AppLovin",
//                    "../../lib/iOS/AppLovinSDK.framework.zip"
//                )
//            ); 
//            
//            // Chartboost
//            PublicAdditionalFrameworks.Add(
//                new UEBuildFramework(
//                    "Chartboost",
//                    "../../lib/iOS/Chartboost.framework.zip"
//                )
//            );


			PublicFrameworks.AddRange(
				new string[] 
				{ 
					"StoreKit",
                    "WebKit",
					"Foundation",
					"CoreGraphics",
					"UIKit",
					"MediaPlayer",
					"CoreData",
					"SystemConfiguration",
					"UIKit",
					"CoreTelephony",
					"EventKit",
					"AdSupport",
					"CoreGraphics",
					"CoreMotion",
					"MessageUI",
					"EventKitUI",
					"CoreLocation",
					"AVFoundation",
					"ARKit"
				}
			);
		}
		else if (Target.Platform == UnrealTargetPlatform.Android)
		{
			string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
			AdditionalPropertiesForReceipt.Add(
				new ReceiptProperty(
					"AndroidPlugin",
					Path.Combine(PluginPath, "PokktAds_APL.xml")
				)
			);
		}
	}
}
