ImmersiveAnalytics.Build.cs 2.29 KB
Newer Older
Jan Kremer's avatar
Jan Kremer committed
1 2
// Fill out your copyright notice in the Description page of Project Settings.

Jan Kremer's avatar
Jan Kremer committed
3
using System.IO;
Jan Kremer's avatar
Jan Kremer committed
4 5 6 7
using UnrealBuildTool;

public class ImmersiveAnalytics : ModuleRules
{
Jan Kremer's avatar
Jan Kremer committed
8 9 10 11 12 13 14 15 16 17
	private string ModulePath
    {
        get { return ModuleDirectory; }
    }

    private string ThirdPartyPath
    {
        get { return Path.GetFullPath( Path.Combine( ModulePath, "../../ThirdParty/" ) ); }
    }
	
Jan Kremer's avatar
Jan Kremer committed
18 19 20 21
	public ImmersiveAnalytics(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
	
Jan Kremer's avatar
Jan Kremer committed
22
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "PointCloudRuntime", "PointCloudEditor" });
Jan Kremer's avatar
Jan Kremer committed
23

Jan Kremer's avatar
Jan Kremer committed
24 25 26 27
        // TODO: remove. was used when HDF5 was added via plugin
		//PrivateDependencyModuleNames.AddRange(new string[] { "HDF5" });
		
		LoadHDF5Lib(Target);
Jan Kremer's avatar
Jan Kremer committed
28 29 30 31 32 33 34 35 36

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
		
		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");

		// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
	}
Jan Kremer's avatar
Jan Kremer committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
	
	public bool LoadHDF5Lib(ReadOnlyTargetRules Target)
    {
        bool isLibrarySupported = false;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            isLibrarySupported = true;
            
            string LibrariesPath = Path.Combine(ThirdPartyPath, "HDF_Group", "HDF5", "1.10.4", "lib");

            //System.Console.WriteLine("... LibrariesPath -> " + LibrariesPath);

            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libszip.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libzlib.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libhdf5.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libhdf5_cpp.lib"));
        }

        if (isLibrarySupported)
        {
            // Include path
            PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "HDF_Group", "HDF5", "1.10.4", "include"));
        }

        PublicDefinitions.Add(string.Format("WITH_HDF5_LIB_BINDING={0}", isLibrarySupported ? 1 : 0));

        return isLibrarySupported;
    }
Jan Kremer's avatar
Jan Kremer committed
66
}