public ESLibrary(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicIncludePaths.AddRange(
            new string[] {
            "ESLibrary/Public"
            // ... add public include paths required here ...
        }
            );


        PrivateIncludePaths.AddRange(
            new string[] {
            "ESLibrary/Private"
            // ... add other private include paths required here ...
        }
            );


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "ProceduralMeshComponent",
            "InputCore",
            "UMG",
            "Paper2D",
            "MariaDBConnectorLibs",
            // ... add other public dependencies that you statically link with here ...
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "HTTP",
            "NetworkReplayStreaming",
            "ImageWrapper",
            "RenderCore",
            "AIModule",
            "NavigationSystem",
            "ApplicationCore",
            "RHI",
            // ... add private dependencies that you statically link with here ...
        }
            );


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );

        PublicDefinitions.Add("WITH_OGGVORBIS");
    }
Exemple #2
0
    public LuaPluginRuntime(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage            = PCHUsageMode.UseExplicitOrSharedPCHs;
        bFasterWithoutUnity = true;
        PublicIncludePaths.Add("LuaPluginRuntime/Public");
        PrivateIncludePaths.Add("LuaPluginRuntime/Private");

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

//         PublicDefinitions.Add("LuaDebug");
        PublicDefinitions.Add("STRONG_CHECK_GC_REF");

        if (Target.Type == TargetType.Editor)
        {
            PrivateDependencyModuleNames.AddRange(new string[] { "VarWatcher", "UnrealEd", "Slate" });
        }
        PublicIncludePaths.Add(Path.Combine(LuaLibPath, "Include"));

        // use 5.3 or 5.1
        bool IsUseLua53 = false;
        bool IsUseLua51 = true;

        if (IsUseLua53)
        {
            PublicDependencyModuleNames.Add("Lua53");
            PublicDefinitions.Add("USE_LUA53");
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicDefinitions.Add("LUA_BUILD_AS_DLL");
//                 Definitions.Add("USE_LUASOURCE");
            }
        }
        else if (IsUseLua51)
        {
            PublicDependencyModuleNames.Add("Lua51");
            PublicDefinitions.Add("USE_LUA51");
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicDefinitions.Add("LUA_BUILD_AS_DLL");
//                 Definitions.Add("USE_LUASOURCE");
            }
        }
        else
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
//                 Definitions.Add("USE_LUASOURCE");
                PublicAdditionalLibraries.Add(Path.Combine(LuaLibPath, "Lib", "Win64", "Debug", "lua.lib"));
//                 PublicAdditionalLibraries.Add(Path.Combine(LuaLibPath, "Lib", "Win64", "Release", "lua.lib"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicAdditionalLibraries.Add(Path.Combine(LuaLibPath, "Lib", "Mac", "Release", "lua.a"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Android)
            {
                PublicAdditionalLibraries.Add(Path.Combine(LuaLibPath, "Lib", "Android", "Release", "lua.a"));
            }
            else if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                PublicAdditionalLibraries.Add(Path.Combine(LuaLibPath, "Lib", "Ios", "Release", "lua.a"));
            }
        }
    }
Exemple #3
0
    public MeshUtilities(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[] {
            "MaterialUtilities",
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "Engine",
            "RawMesh",
            "RenderCore",                     // For FPackedNormal
            "SlateCore",
            "Slate",
            "MaterialUtilities",
            "MeshBoneReduction",
            "UnrealEd",
            "RHI",
            "HierarchicalLODUtilities",
            "Landscape",
            "LevelEditor",
            "AnimationBlueprintEditor",
            "AnimationEditor",
            "SkeletalMeshEditor",
            "SkeletonEditor",
            "PropertyEditor",
            "EditorStyle",
            "GraphColor",
            "MeshBuilder",
            "MeshUtilitiesCommon",
        }
            );

        PublicIncludePathModuleNames.AddRange(
            new string[] {
            "MeshMergeUtilities"
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "MeshMergeUtilities",
            "MaterialBaking",
        }
            );

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
            "MeshMergeUtilities",
            "MaterialBaking",
        }
            );

        AddEngineThirdPartyPrivateStaticDependencies(Target, "nvTriStrip");
        AddEngineThirdPartyPrivateStaticDependencies(Target, "ForsythTriOptimizer");
        AddEngineThirdPartyPrivateStaticDependencies(Target, "QuadricMeshReduction");
        AddEngineThirdPartyPrivateStaticDependencies(Target, "MikkTSpace");
        AddEngineThirdPartyPrivateStaticDependencies(Target, "nvTessLib");

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "DX9");
        }

        if (Target.bCompileSimplygon == true)
        {
            AddEngineThirdPartyPrivateDynamicDependencies(Target, "SimplygonMeshReduction");

            if (Target.bCompileSimplygonSSF == true)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "SimplygonSwarm"
                }
                    );
            }
        }

        // EMBREE
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string SDKDir = Target.UEThirdPartySourceDirectory + "IntelEmbree/Embree2140/Win64/";

            PublicIncludePaths.Add(SDKDir + "include");
            PublicLibraryPaths.Add(SDKDir + "lib");
            PublicAdditionalLibraries.Add("embree.2.14.0.lib");
            RuntimeDependencies.Add("$(TargetOutputDir)/embree.2.14.0.dll", SDKDir + "lib/embree.2.14.0.dll");
            RuntimeDependencies.Add("$(TargetOutputDir)/tbb.dll", SDKDir + "lib/tbb.dll");
            RuntimeDependencies.Add("$(TargetOutputDir)/tbbmalloc.dll", SDKDir + "lib/tbbmalloc.dll");
            PublicDefinitions.Add("USE_EMBREE=1");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string SDKDir = Target.UEThirdPartySourceDirectory + "IntelEmbree/Embree2140/MacOSX/";

            PublicIncludePaths.Add(SDKDir + "include");
            PublicAdditionalLibraries.Add(SDKDir + "lib/libembree.2.14.0.dylib");
            PublicAdditionalLibraries.Add(SDKDir + "lib/libtbb.dylib");
            PublicAdditionalLibraries.Add(SDKDir + "lib/libtbbmalloc.dylib");
            PublicDefinitions.Add("USE_EMBREE=1");
        }
        else
        {
            PublicDefinitions.Add("USE_EMBREE=0");
        }
    }
Exemple #4
0
        public FMODStudio(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
            PrivatePCHHeaderFile = "Private/FMODStudioPrivatePCH.h";

            bUseUnity = false;

            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/FMOD"));
            PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Classes"));

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "Media",
                "Projects"
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "MovieScene",
                "MovieSceneTracks"
            }
                );

            if (Target.bBuildEditor == true)
            {
                PrivateDependencyModuleNames.Add("AssetRegistry");
                PrivateDependencyModuleNames.Add("UnrealEd");
                PrivateDependencyModuleNames.Add("Settings");
            }

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
            }
                );

            string configName = "";

            if (Target.Configuration != UnrealTargetConfiguration.Shipping)
            {
                configName = "L";
                PublicDefinitions.Add("FMODSTUDIO_LINK_LOGGING=1");
            }
            else
            {
                configName = "";
                PublicDefinitions.Add("FMODSTUDIO_LINK_RELEASE=1");
            }

            string linkExtension = "";
            string dllExtension  = "";
            string libPrefix     = "";
            string libPath       = FMODLibDir;

            bool bAddRuntimeDependencies = true;
            bool bAddDelayLoad           = false;

            if (libPath == null)
            {
                string platformName = Target.Platform.ToString();

                libPath = System.IO.Path.Combine(LibRootDirectory, platformName);

                // Minimum UE version for Switch 4.15
                System.Console.WriteLine("Target Platform -- " + Target.Platform.ToString());
                if (Target.Platform == UnrealTargetPlatform.Switch)
                {
                    linkExtension           = ".a";
                    dllExtension            = ".a";
                    libPrefix               = "lib";
                    bAddRuntimeDependencies = false;
                }
                else if (Target.Platform.ToString() == "UWP64")
                {
                    linkExtension = ".lib";
                    dllExtension  = ".dll";
                    bAddDelayLoad = true;
                }
                else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Windows))
                {
                    linkExtension = "_vc.lib";
                    dllExtension  = ".dll";
                    bAddDelayLoad = true;
                }
                else if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    linkExtension = dllExtension = ".dylib";
                    libPrefix     = "lib";

                    libPath = System.IO.Path.Combine(ModuleDirectory, "../../Libs/Mac/");
                }
                else if (Target.Platform == UnrealTargetPlatform.XboxOne)
                {
                    linkExtension = "_vc.lib";
                    dllExtension  = ".dll";
                }
                else if (Target.Platform == UnrealTargetPlatform.PS4)
                {
                    linkExtension = "_stub.a";
                    dllExtension  = ".prx";
                    libPrefix     = "lib";
                    bAddDelayLoad = true;
                }
                else if (Target.Platform == UnrealTargetPlatform.Android)
                {
                    bAddRuntimeDependencies = false; // Don't use this system
                    linkExtension           = dllExtension = ".so";
                    libPrefix = "lib";
                }
                else if (Target.Platform == UnrealTargetPlatform.IOS)
                {
                    linkExtension           = "_iphoneos.a";
                    libPrefix               = "lib";
                    bAddRuntimeDependencies = false;
                }
                else if (Target.Platform == UnrealTargetPlatform.TVOS)
                {
                    linkExtension           = "_appletvos.a";
                    libPrefix               = "lib";
                    bAddRuntimeDependencies = false;
                }
                else if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    libPath       = System.IO.Path.Combine(libPath, "x86_64");
                    linkExtension = ".so";
                    dllExtension  = ".so";
                    libPrefix     = "lib";
                }
            }
            else
            {
                linkExtension = ConsoleLinkExt;
                dllExtension  = ConsoleDllExt;
                libPrefix     = ConsoleLibPrefix;

                bAddRuntimeDependencies = ConsoleRuntimeDependencies;
                bAddDelayLoad           = ConsoleDelayLoad;
            }

            // Collapse the directory path, otherwise MacOS has issues with plugin paths.
            libPath = Utils.CleanDirectorySeparators(libPath);

            string fmodLibName       = System.String.Format("{0}fmod{1}{2}", libPrefix, configName, linkExtension);
            string fmodStudioLibName = System.String.Format("{0}fmodstudio{1}{2}", libPrefix, configName, linkExtension);

            string fmodDllName       = System.String.Format("{0}fmod{1}{2}", libPrefix, configName, dllExtension);
            string fmodStudioDllName = System.String.Format("{0}fmodstudio{1}{2}", libPrefix, configName, dllExtension);

            string fmodLibPath       = System.IO.Path.Combine(libPath, fmodLibName);
            string fmodStudioLibPath = System.IO.Path.Combine(libPath, fmodStudioLibName);

            string fmodDllPath       = System.IO.Path.Combine(libPath, fmodDllName);
            string fmodStudioDllPath = System.IO.Path.Combine(libPath, fmodStudioDllName);

            System.Collections.Generic.List <string> plugins = GetPlugins(libPath);

            if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
            {
                string[] archs = new string[] { "armeabi-v7a", "arm64-v8a", "x86_64" };
                foreach (string arch in archs)
                {
                    string LibPath = System.IO.Path.Combine(libPath, arch);
                    PublicAdditionalLibraries.Add(System.String.Format("{0}/{1}", LibPath, fmodLibName));
                    PublicAdditionalLibraries.Add(System.String.Format("{0}/{1}", LibPath, fmodStudioLibName));
                }
            }
            else
            {
                PublicAdditionalLibraries.Add(fmodLibPath);
                PublicAdditionalLibraries.Add(fmodStudioLibPath);
            }

            if (bAddRuntimeDependencies)
            {
                RuntimeDependencies.Add(fmodDllPath);
                RuntimeDependencies.Add(fmodStudioDllPath);
                foreach (string plugin in plugins)
                {
                    string pluginPath = System.IO.Path.Combine(libPath, plugin + dllExtension);
                    System.Console.WriteLine("Adding reference to FMOD plugin: " + pluginPath);
                    RuntimeDependencies.Add(pluginPath);
                }
            }

            if (CopyThirdPartyPath != null)
            {
                string destPath = System.IO.Path.Combine(Target.UEThirdPartyBinariesDirectory, CopyThirdPartyPath);
                System.IO.Directory.CreateDirectory(destPath);

                string fmodDllDest       = System.IO.Path.Combine(destPath, fmodDllName);
                string fmodStudioDllDest = System.IO.Path.Combine(destPath, fmodStudioDllName);

                CopyFile(fmodDllPath, fmodDllDest);
                CopyFile(fmodStudioDllPath, fmodStudioDllDest);
            }

            if (bAddDelayLoad)
            {
                PublicDelayLoadDLLs.AddRange(
                    new string[] {
                    fmodDllName,
                    fmodStudioDllName
                }
                    );
            }

            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                string APLName    = System.String.Format("FMODStudio{0}_APL.xml", configName);
                string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(ModuleDirectory, APLName), Target.RelativeEnginePath);
                System.Console.WriteLine("Adding {0}", RelAPLPath);
                AdditionalPropertiesForReceipt.Add("AndroidPlugin", RelAPLPath);
                foreach (string PluginName in System.IO.Directory.GetFiles(libPath))
                {
                    if (PluginName.EndsWith("_APL.xml", System.StringComparison.OrdinalIgnoreCase))
                    {
                        string RelPluginPath = Utils.MakePathRelativeTo(PluginName, Target.RelativeEnginePath);
                        System.Console.WriteLine("Adding {0}", RelPluginPath);
                        AdditionalPropertiesForReceipt.Add("AndroidPlugin", RelPluginPath);
                    }
                }
            }
        }
Exemple #5
0
    public HoudiniEngineEditor(ReadOnlyTargetRules Target) : base(Target)
    {
        bPrecompile          = true;
        PCHUsage             = PCHUsageMode.NoSharedPCHs;
        PrivatePCHHeaderFile = "Private/HoudiniEngineEditorPrivatePCH.h";

        // Check if we are compiling on unsupported platforms.
        if (Target.Platform != UnrealTargetPlatform.Win64 &&
            Target.Platform != UnrealTargetPlatform.Mac &&
            Target.Platform != UnrealTargetPlatform.Linux)
        {
            string Err = string.Format("Houdini Engine Editor: Compiling for unsupported platform.");
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }

        // Find HFS
        string HFSPath = GetHFSPath();

        HFSPath = HFSPath.Replace("\\", "/");
        if (HFSPath != "")
        {
            PlatformID buildPlatformId = Environment.OSVersion.Platform;
            if (buildPlatformId == PlatformID.Win32NT)
            {
                PublicDefinitions.Add("HOUDINI_ENGINE_HFS_PATH_DEFINE=" + HFSPath);
            }
        }

        // Find the HAPI include directory
        string HAPIIncludePath = HFSPath + "/toolkit/include/HAPI";

        if (!Directory.Exists(HAPIIncludePath))
        {
            // Try the custom include path as well in case the toolkit path doesn't exist yet.
            HAPIIncludePath = HFSPath + "/custom/houdini/include/HAPI";

            if (!Directory.Exists(HAPIIncludePath))
            {
                System.Console.WriteLine(string.Format("Couldnt find the HAPI include folder!"));
                HAPIIncludePath = "";
            }
        }

        if (HAPIIncludePath != "")
        {
            PublicIncludePaths.Add(HAPIIncludePath);
        }

        // Get the plugin path
        string PluginPath = Path.Combine(ModuleDirectory, "../../");

        PluginPath = Utils.MakePathRelativeTo(PluginPath, Target.RelativeEnginePath);

        PublicIncludePaths.AddRange(
            new string[] {
            Path.Combine(ModuleDirectory, "Public")
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            "HoudiniEngineEditor/Private",
            "HoudiniEngineRuntime/Private"
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "PlacementMode"
        }
            );

        // Add common dependencies.
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "HoudiniEngineRuntime",
            "Slate",
            "SlateCore",
            "Landscape"
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "AppFramework",
            "AssetTools",
            "ContentBrowser",
            "DesktopWidgets",
            "EditorStyle",
            "EditorWidgets",
            "Engine",
            "InputCore",
            "LevelEditor",
            "MainFrame",
            "Projects",
            "PropertyEditor",
            "RHI",
            "RawMesh",
            "RenderCore",
            "TargetPlatform",
            "UnrealEd",
            "ApplicationCore",
            "CurveEditor",
            "Json",
            "SceneOutliner"
        }
            );

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "PlacementMode",
        }
            );
    }
Exemple #6
0
    public Launch(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateIncludePaths.Add("Runtime/Launch/Private");

        PrivateIncludePathModuleNames.AddRange(new string[] {
            "AutomationController",
            "TaskGraph",
        });

        PrivateDependencyModuleNames.AddRange(new string[] {
            "Core",
            "CoreUObject",
            "Engine",
            "InputCore",
            "MoviePlayer",
            "Networking",
            "PakFile",
            "Projects",
            "RenderCore",
            "RHI",
            "SandboxFile",
            "Serialization",
            "ApplicationCore",
            "Slate",
            "SlateCore",
            "Sockets",
            "TraceLog",
            "Overlay",
            "PreLoadScreen",
            "InstallBundleManager"
        });

        // Set a macro allowing us to switch between debuggame/development configuration
        if (Target.Configuration == UnrealTargetConfiguration.DebugGame)
        {
            PrivateDefinitions.Add("UE_BUILD_DEVELOPMENT_WITH_DEBUGGAME=1");
        }
        else
        {
            PrivateDefinitions.Add("UE_BUILD_DEVELOPMENT_WITH_DEBUGGAME=0");
        }

        // Enable the LauncherCheck module to be used for platforms that support the Launcher.
        // Projects should set Target.bUseLauncherChecks in their Target.cs to enable the functionality.
        if (Target.bUseLauncherChecks &&
            ((Target.Platform == UnrealTargetPlatform.Win32) ||
             (Target.Platform == UnrealTargetPlatform.Win64) ||
             (Target.Platform == UnrealTargetPlatform.Mac)))
        {
            PrivateDependencyModuleNames.Add("LauncherCheck");
            PublicDefinitions.Add("WITH_LAUNCHERCHECK=1");
        }
        else
        {
            PublicDefinitions.Add("WITH_LAUNCHERCHECK=0");
        }

        if (Target.Type != TargetType.Server)
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "HeadMountedDisplay",
                "MediaUtils",
                "MRMesh",
            });

            if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] {
                    "WindowsPlatformFeatures",
                });
            }

            if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] {
                    "AudioMixerXAudio2",
                    "XAudio2",
                });
            }
            else if (Target.Platform == UnrealTargetPlatform.HoloLens)
            {
                DynamicallyLoadedModuleNames.Add("D3D11RHI");
                DynamicallyLoadedModuleNames.Add("XAudio2");
                DynamicallyLoadedModuleNames.Add("AudioMixerXAudio2");
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] {
                    "AudioMixerCoreAudio",
                    "CoreAudio",
                });
            }
            else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
            {
                DynamicallyLoadedModuleNames.Add("AudioMixerSDL");
                PrivateDependencyModuleNames.Add("Json");
            }

            PrivateIncludePathModuleNames.AddRange(new string[] {
                "Media",
                "SlateNullRenderer",
                "SlateRHIRenderer",
            });

            DynamicallyLoadedModuleNames.AddRange(new string[] {
                "Media",
                "SlateNullRenderer",
                "SlateRHIRenderer",
            });
        }

        // UFS clients are not available in shipping builds
        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "NetworkFile",
                "StreamingFile",
                "CookedIterativeFile",
                "AutomationWorker"
            });
        }

        DynamicallyLoadedModuleNames.AddRange(new string[] {
            "Renderer",
        });

        if (Target.bCompileAgainstEngine)
        {
            PrivateIncludePathModuleNames.AddRange(new string[] {
                "MessagingCommon",
            });

            PublicDependencyModuleNames.Add("SessionServices");
            PrivateIncludePaths.Add("Developer/DerivedDataCache/Public");

            // LaunchEngineLoop.cpp will still attempt to load XMPP but not all projects require it so it will silently fail unless referenced by the project's build.cs file.
            // DynamicallyLoadedModuleNames.Add("XMPP");

            DynamicallyLoadedModuleNames.AddRange(new string[] {
                "HTTP",
                "MediaAssets",
            });

            PrivateDependencyModuleNames.AddRange(new string[] {
                "ClothingSystemRuntimeNv",
                "ClothingSystemRuntimeInterface"
            });

            if (Target.Configuration != UnrealTargetConfiguration.Shipping)
            {
                PrivateDependencyModuleNames.AddRange(new string[] {
                    "FunctionalTesting"
                });
            }
        }

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PublicIncludePathModuleNames.Add("ProfilerService");

            DynamicallyLoadedModuleNames.AddRange(new string[] {
                "TaskGraph",
                "RealtimeProfiler",
                "ProfilerService"
            });
        }

        // The engine can use AutomationController in any connfiguration besides shipping.  This module is loaded
        // dynamically in LaunchEngineLoop.cpp in non-shipping configurations
        if (Target.bCompileAgainstEngine && Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            DynamicallyLoadedModuleNames.AddRange(new string[] { "AutomationController" });
        }

        if (Target.bBuildEditor == true)
        {
            PublicIncludePathModuleNames.Add("ProfilerClient");

            PrivateDependencyModuleNames.AddRange(new string[] {
                "SourceControl",
                "UnrealEd",
                "DesktopPlatform",
                "PIEPreviewDeviceProfileSelector",
            });


            // ExtraModules that are loaded when WITH_EDITOR=1 is true
            DynamicallyLoadedModuleNames.AddRange(new string[] {
                "AutomationWindow",
                "ProfilerClient",
                "Toolbox",
                "GammaUI",
                "ModuleUI",
                "OutputLog",
                "TextureCompressor",
                "MeshUtilities",
                "SourceCodeAccess"
            });

            if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PrivateDependencyModuleNames.AddRange(new string[] {
                    "MainFrame",
                    "Settings",
                });
            }
            else
            {
                DynamicallyLoadedModuleNames.Add("MainFrame");
            }
        }

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            PrivateDependencyModuleNames.Add("OpenGLDrv");
            if (Target.Platform != UnrealTargetPlatform.Lumin)
            {
                PrivateDependencyModuleNames.Add("AndroidAudio");
                PrivateDependencyModuleNames.Add("AudioMixerAndroid");
            }
            // these are, for now, only for basic android
            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                DynamicallyLoadedModuleNames.Add("AndroidRuntimeSettings");
                DynamicallyLoadedModuleNames.Add("AndroidLocalNotification");
            }
            else if (Target.Platform == UnrealTargetPlatform.Lumin)
            {
                DynamicallyLoadedModuleNames.Add("LuminRuntimeSettings");
            }
        }

        if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "AudioMixerAudioUnit",
                "IOSAudio",
                "LaunchDaemonMessages",
            });

            DynamicallyLoadedModuleNames.AddRange(new string[] {
                "IOSLocalNotification",
                "IOSRuntimeSettings",
            });

            // needed for Metal layer
            PublicFrameworks.Add("QuartzCore");
        }

        if ((Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.IsInPlatformGroup(UnrealPlatformGroup.Linux) && Target.Type != TargetType.Server))
        {
            // TODO: re-enable after implementing resource tables for OpenGL.
            DynamicallyLoadedModuleNames.Add("OpenGLDrv");
        }

        // @todo ps4 clang bug: this works around a PS4/clang compiler bug (optimizations)
        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            bUseUnity = true;
        }

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            // Clang 9.0.1 lld seems to end up having issues with resolving EditorStyle
            // when dealing with circular dependencies on SourceControl module
            if (Target.bBuildEditor == true)
            {
                PrivateDependencyModuleNames.Add("EditorStyle");
            }

            PrivateDependencyModuleNames.Add("UnixCommonStartup");
        }

        if (Target.LinkType == TargetLinkType.Monolithic && !Target.bFormalBuild)
        {
            PrivateDefinitions.Add(string.Format("COMPILED_IN_CL={0}", Target.Version.Changelist));
            PrivateDefinitions.Add(string.Format("COMPILED_IN_COMPATIBLE_CL={0}", Target.Version.EffectiveCompatibleChangelist));
            PrivateDefinitions.Add(string.Format("COMPILED_IN_BRANCH_NAME={0}", (Target.Version.BranchName == null || Target.Version.BranchName.Length == 0)? "UE4" : Target.Version.BranchName));
        }
    }
Exemple #7
0
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        PublicDefinitions.Add("WITH_UNREALENGINEPYTHON=1"); // fixed
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bUseUnity = string.IsNullOrEmpty(enableUnityBuild);

        PublicIncludePaths.AddRange(
            new string[] {
            Path.Combine(ModuleDirectory, "Public"),
            // ... add public include paths required here ...
        }
            );


        PrivateIncludePaths.AddRange(
            new string[] {
            Path.Combine(ModuleDirectory, "Private"),
            PythonHome,
            // ... add other private include paths required here ...
        }
            );


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Sockets",
            "Networking",
            "Projects"
            // ... add other public dependencies that you statically link with here ...
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "InputCore",
            "Slate",
            "SlateCore",
            "MovieScene",
            "LevelSequence",
            "HTTP",
            "UMG",
            "AppFramework",
            "RHI",
            "Voice",
            "RenderCore",
            "MovieSceneCapture",
            "Landscape",
            "Foliage",
            "AIModule"
            // ... add private dependencies that you statically link with here ...
        }
            );


#if WITH_FORWARDED_MODULE_RULES_CTOR
        BuildVersion Version;
        if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version))
        {
            if (Version.MinorVersion >= 18)
            {
                PrivateDependencyModuleNames.Add("ApplicationCore");
            }
        }
#endif


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );

#if WITH_FORWARDED_MODULE_RULES_CTOR
        if (Target.bBuildEditor)
#else
        if (UEBuildConfiguration.bBuildEditor)
#endif
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "UnrealEd",
                "LevelEditor",
                "BlueprintGraph",
                "Projects",
                "Sequencer",
                "SequencerWidgets",
                "AssetTools",
                "LevelSequenceEditor",
                "MovieSceneTools",
                "MovieSceneTracks",
                "CinematicCamera",
                "EditorStyle",
                "GraphEditor",
                "UMGEditor",
                "AIGraph",
                "RawMesh",
                "DesktopWidgets",
                "EditorWidgets",
                "FBX",
                "Persona",
                "PropertyEditor",
                "LandscapeEditor",
                "MaterialEditor"
            });
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            if (UseThirdPartyPython)
            {
                PythonHome = ThirdPartyPythonHome;

                System.Console.WriteLine("Using Embedded Python at: " + PythonHome);
                PublicIncludePaths.Add(PythonHome);
                string libPath = Path.Combine(PythonHome, "Lib", string.Format("{0}.lib", PythonType.ToLower()));

                System.Console.WriteLine("full lib path: " + libPath);
                PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
                PublicAdditionalLibraries.Add(libPath);

                string dllPath = Path.Combine(BinariesPath, "Win64", string.Format("{0}.dll", PythonType.ToLower()));
                RuntimeDependencies.Add(dllPath);

                AddRuntimeDependenciesForCopying(Target);
            }
            else if (PythonHome == "")
            {
                PythonHome = DiscoverPythonPath(windowsKnownPaths, "Win64");
                if (PythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }

                System.Console.WriteLine("Using Python at: " + PythonHome);
                PublicIncludePaths.Add(PythonHome);
                string libPath = GetWindowsPythonLibFile(PythonHome);
                PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
                PublicAdditionalLibraries.Add(libPath);
            }
        }

        //other platforms
        else
        {
            if (PythonHome == "")
            {
                PythonHome = DiscoverPythonPath(macKnownPaths, "Mac");
                if (PythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
                System.Console.WriteLine("Using Python at: " + PythonHome);
                PublicIncludePaths.Add(PythonHome);
                PublicAdditionalLibraries.Add(Path.Combine(PythonHome, "Lib", string.Format("{0}.lib", PythonType)));
            }
            System.Console.WriteLine("Using Python at: " + PythonHome);
            PublicIncludePaths.Add(PythonHome);
            string libPath = GetMacPythonLibFile(PythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicDelayLoadDLLs.Add(libPath);
        }
        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (PythonHome == "")
            {
                string includesPath = DiscoverLinuxPythonIncludesPath();
                if (includesPath == null)
                {
                    throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
                }
                string libsPath = DiscoverLinuxPythonLibsPath();
                if (libsPath == null)
                {
                    throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
                }
                PublicIncludePaths.Add(includesPath);
                PublicAdditionalLibraries.Add(libsPath);
            }
            else
            {
                string[] items = PythonHome.Split(';');
                PublicIncludePaths.Add(items[0]);
                PublicAdditionalLibraries.Add(items[1]);
            }
        }
#if WITH_FORWARDED_MODULE_RULES_CTOR
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/python35/include"));
            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/armeabi-v7a"));
            PublicAdditionalLibraries.Add("python3.5m");

            string APLName    = "UnrealEnginePython_APL.xml";
            string RelAPLPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(RelAPLPath, APLName));
        }
#endif
    }
Exemple #8
0
    public Noesis(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string NoesisBasePath    = ModuleDirectory + "/NoesisSDK/";
        string NoesisIncludePath = NoesisBasePath + "Include/";
        string NoesisInteractivityIncludePath = NoesisBasePath + "Src/Packages/App/Interactivity/Include/";

        PublicIncludePaths.Add(ModuleDirectory);
        PublicIncludePaths.Add(NoesisIncludePath);
        PublicIncludePaths.Add(NoesisInteractivityIncludePath);

        // Let's try to make sure the right version of the SDK is in the right place.
        const string RequiredRevision    = "(r8047)";
        const string RequiredVersionName = "2.2.2";

        PublicDefinitions.Add("NOESIS_VERSION_NAME=\"" + RequiredVersionName + "\"");
        if (!Directory.Exists(NoesisBasePath))
        {
            throw new BuildException("Could not find NoesisGUI SDK in " + NoesisBasePath + ". Minimum required version is " + RequiredVersionName);
        }

        if (!Directory.Exists(NoesisBasePath + "Bin"))
        {
            throw new BuildException("Could not find NoesisGUI SDK Bin directory in " + NoesisBasePath + "Bin. Minimum required version is " + RequiredVersionName);
        }

        if (!Directory.Exists(NoesisBasePath + "Include"))
        {
            throw new BuildException("Could not find NoesisGUI SDK Include directory in " + NoesisBasePath + "Include. Minimum required version is " + RequiredVersionName);
        }

        if (!Directory.Exists(NoesisBasePath + "Lib"))
        {
            throw new BuildException("Could not find NoesisGUI SDK Lib directory in " + NoesisBasePath + "Lib. Minimum required version is " + RequiredVersionName);
        }

        string NoesisSdkVersionInfo;

        try
        {
            NoesisSdkVersionInfo = File.ReadAllText(NoesisBasePath + "version.txt");
        }
        catch (Exception)
        {
            throw new BuildException("Could not find NoesisGUI SDK version.txt in " + NoesisBasePath + "version.txt. Minimum required version is " + RequiredVersionName);
        }

        string[] SplitVersion = NoesisSdkVersionInfo.Split(' ');
        if (String.Compare(SplitVersion[SplitVersion.Length - 1], RequiredRevision) < 0)
        {
            throw new BuildException("Wrong version of the NoesisGUI SDK installed in " + NoesisBasePath + ". Minimum required version is " + RequiredVersionName);
        }

        PublicSystemIncludePaths.Add(NoesisIncludePath);

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string NoesisLibPath = NoesisBasePath + "Lib/windows_x86_64/";
            PublicLibraryPaths.Add(NoesisLibPath);
            PublicAdditionalLibraries.Add("Noesis.lib");

            string NoesisDllPath       = "/NoesisSDK/Bin/windows_x86_64/Noesis.dll";
            string NoesisDllTargetPath = "/Binaries/Win64/Noesis.dll";

            if (Target.ProjectFile != null)
            {
                CopyNoesisDll(ModuleDirectory + NoesisDllPath, DirectoryReference.FromFile(Target.ProjectFile).ToString() + NoesisDllTargetPath);
            }

            CopyNoesisDll(ModuleDirectory + NoesisDllPath, ModuleDirectory + "/../.." + NoesisDllTargetPath);

            if (System.IO.File.Exists(Target.RelativeEnginePath + NoesisDllTargetPath))
            {
                System.IO.File.Delete(Target.RelativeEnginePath + NoesisDllTargetPath);
            }

            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                RuntimeDependencies.Add("$(ProjectDir)" + NoesisDllTargetPath);
            }
            else
            {
                RuntimeDependencies.Add("$(EngineDir)" + NoesisDllTargetPath);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/osx/";
            PublicLibraryPaths.Add(NoesisLibPath);
            PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.dylib");

            string NoesisDylibPath = "/NoesisSDK/Bin/osx/Noesis.dylib";
            RuntimeDependencies.Add(ModuleDirectory + NoesisDylibPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            string NoesisLibPath = NoesisBasePath + "Lib/ios/";
            PublicLibraryPaths.Add(NoesisLibPath);
            PublicAdditionalLibraries.Add("Noesis");

            PublicFrameworks.Add("CoreText");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/android_arm/";
            PublicLibraryPaths.Add(NoesisLibPath);
            string NoesisLib64Path = NoesisBasePath + "Bin/android_arm64/";
            PublicLibraryPaths.Add(NoesisLib64Path);
            PublicAdditionalLibraries.Add("Noesis");

            string NoesisAplPath = "/Noesis_APL.xml";
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", ModuleDirectory + NoesisAplPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            string NoesisLibPath = NoesisBasePath + "Lib/ps4/";
            PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/xbox_one/";
            PublicLibraryPaths.Add(NoesisLibPath);
            PublicAdditionalLibraries.Add("Noesis.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/wasm/";
            PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.bc");
        }
    }
Exemple #9
0
    public GameLiftServerSDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Projects"
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
        }
            );


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
        }
            );

        // This is required to fix a warning for Unreal Engine 4.21 and later
        PrivatePCHHeaderFile = "Private/GameLiftServerSDKPrivatePCH.h";

        bEnableExceptions = true;

        string BaseDirectory = System.IO.Path.GetFullPath(System.IO.Path.Combine(ModuleDirectory, "..", ".."));
        string SDKDirectory  = System.IO.Path.Combine(BaseDirectory, "ThirdParty", "GameLiftServerSDK", Target.Platform.ToString());

        bool bHasGameLiftSDK = System.IO.Directory.Exists(SDKDirectory);

        if (bHasGameLiftSDK)
        {
            if (Target.Type == TargetRules.TargetType.Server)
            {
                PublicDefinitions.Add("WITH_GAMELIFT=1");
                if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    SDKDirectory = System.IO.Path.Combine(SDKDirectory, "x86_64-unknown-linux-gnu");
                    string SDKLib = System.IO.Path.Combine(SDKDirectory, "libaws-cpp-sdk-gamelift-server.so");

                    PublicSystemLibraryPaths.Add(SDKDirectory);
                    PublicAdditionalLibraries.Add(SDKLib);
                    RuntimeDependencies.Add(SDKLib);
                }
                else if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PublicSystemLibraryPaths.Add(SDKDirectory);
                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-gamelift-server.dll");
                    string SDKLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.dll");
                    RuntimeDependencies.Add(SDKLibWindows);
                }
            }
            else
            {
                PublicDefinitions.Add("WITH_GAMELIFT=0");
            }
        }
        else
        {
            PublicDefinitions.Add("WITH_GAMELIFT=0");
        }
    }
Exemple #10
0
    public Vorbis(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string VorbisPath = Target.UEThirdPartySourceDirectory + "Vorbis/libvorbis-1.3.2/";

        PublicIncludePaths.Add(VorbisPath + "include");
        PublicDefinitions.Add("WITH_OGGVORBIS=1");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string VorbisLibPath = VorbisPath + "Lib/win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            PublicLibraryPaths.Add(VorbisLibPath);

            PublicAdditionalLibraries.Add("libvorbis_64.lib");
            PublicDelayLoadDLLs.Add("libvorbis_64.dll");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Vorbis/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libvorbis_64.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            string VorbisLibPath = VorbisPath + "Lib/win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            PublicLibraryPaths.Add(VorbisLibPath);

            PublicAdditionalLibraries.Add("libvorbis.lib");
            PublicDelayLoadDLLs.Add("libvorbis.dll");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Vorbis/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libvorbis.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.AddRange(
                new string[] {
                VorbisPath + "macosx/libvorbis.dylib",
            }
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            string VorbisLibPath = VorbisPath + "lib/HTML5/";
            PublicLibraryPaths.Add(VorbisLibPath);

            string OpimizationSuffix = "";
            if (Target.bCompileForSize)
            {
                OpimizationSuffix = "_Oz";
            }
            else
            {
                if (Target.Configuration == UnrealTargetConfiguration.Development)
                {
                    OpimizationSuffix = "_O2";
                }
                else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                {
                    OpimizationSuffix = "_O3";
                }
            }
            PublicAdditionalLibraries.Add(VorbisLibPath + "libvorbis" + OpimizationSuffix + ".bc");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // toolchain will filter
            PublicLibraryPaths.Add(VorbisPath + "lib/Android/ARMv7");
            PublicLibraryPaths.Add(VorbisPath + "lib/Android/ARM64");
            PublicLibraryPaths.Add(VorbisPath + "lib/Android/x86");
            PublicLibraryPaths.Add(VorbisPath + "lib/Android/x64");

            PublicAdditionalLibraries.Add("vorbis");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicAdditionalLibraries.Add(VorbisPath + "lib/Linux/" + Target.Architecture + "/libvorbis.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Use reflection to allow type not to exist if console code is not present
            System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
            if (XboxOnePlatformType != null)
            {
                System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                PublicLibraryPaths.Add(VorbisPath + "lib/XboxOne/VS" + VersionName.ToString());
                PublicAdditionalLibraries.Add("libvorbis_static.lib");
            }
        }
    }
Exemple #11
0
    public HoudiniEngineRuntime(ReadOnlyTargetRules Target) : base(Target)
    {
        bPrecompile          = true;
        PCHUsage             = PCHUsageMode.UseSharedPCHs;
        PrivatePCHHeaderFile = "Private/HoudiniEngineRuntimePrivatePCH.h";

        // Check if we are compiling for unsupported platforms.
        if (Target.Platform != UnrealTargetPlatform.Win64 &&
            Target.Platform != UnrealTargetPlatform.Mac &&
            Target.Platform != UnrealTargetPlatform.Linux &&
            Target.Platform != UnrealTargetPlatform.Switch)
        {
            System.Console.WriteLine(string.Format("Houdini Engine: Compiling for untested target platform.  Please let us know how it goes!"));
        }

        // Find HFS
        string HFSPath = GetHFSPath();

        HFSPath = HFSPath.Replace("\\", "/");

        if (HFSPath != "")
        {
            string Log = string.Format("Houdini Engine: Found Houdini in {0}", HFSPath);
            System.Console.WriteLine(Log);

            PlatformID buildPlatformId = Environment.OSVersion.Platform;
            if (buildPlatformId == PlatformID.Win32NT)
            {
                PublicDefinitions.Add("HOUDINI_ENGINE_HFS_PATH_DEFINE=" + HFSPath);
            }
        }

        // Find the HAPI include directory
        string HAPIIncludePath = HFSPath + "/toolkit/include/HAPI";

        if (!Directory.Exists(HAPIIncludePath))
        {
            // Add the custom include path as well in case the toolkit path doesn't exist yet.
            HAPIIncludePath = HFSPath + "/custom/houdini/include/HAPI";

            if (!Directory.Exists(HAPIIncludePath))
            {
                System.Console.WriteLine(string.Format("Couldn't find the HAPI include folder!"));
                HAPIIncludePath = "";
            }
        }

        if (HAPIIncludePath != "")
        {
            PublicIncludePaths.Add(HAPIIncludePath);
        }

        PublicIncludePaths.AddRange(
            new string[] {
            Path.Combine(ModuleDirectory, "Public/HAPI"),
            Path.Combine(ModuleDirectory, "Public")
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            "HoudiniEngineRuntime/Private"
        }
            );

        // Add common dependencies.
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "RenderCore",
            "InputCore",
            "RHI",
            "Foliage",
            "Landscape"
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            // ... add private dependencies that you statically link with here ...
        }
            );

        if (Target.bBuildEditor == true)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "AppFramework",
                "AssetTools",
                "EditorStyle",
                "EditorWidgets",
                "LevelEditor",
                "MainFrame",
                "MeshPaint",
                "Projects",
                "PropertyEditor",
                "RawMesh",
                "Settings",
                "Slate",
                "SlateCore",
                "TargetPlatform",
                "UnrealEd",
                "ApplicationCore",
                "Landscape",
                "LandscapeEditor"
            }
                );
        }

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );
    }
    public VRExpansionPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
        //bEnforceIWYU = true;

        PublicDefinitions.Add("WITH_VR_EXPANSION=1");

        // To detect VR Preview, not built out in packaged builds
        if (Target.bBuildEditor == true)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd"
            }
                );
        }

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "Settings"
        }
            );

        PublicIncludePaths.AddRange(
            new string[] {
            //"VRExpansionPlugin/Public",
            //"VRExpansionPlugin/Public/SimpleChar",
            //"HeadMountedDisplay/Public",
            //"Runtime/Engine/Private/PhysicsEngine"

            // ... add public include paths required here ...
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            //"VRExpansionPlugin/Private",
            //"VRExpansionPlugin/Private/SimpleChar",
            // ... add other private include paths required here ...
        }
            );

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            // "InputCore",
            "PhysicsCore",
            //"FLEX", remove comment if building in the NVIDIA flex branch - NOTE when put in place FLEX only listed win32 and win64 at compatible platforms
            "HeadMountedDisplay",
            // "RHI",
            //"RenderCore",
            //"ShaderCore",
            //"NetworkReplayStreaming",
            //"AIModule",
            "UMG",
            "NavigationSystem",
            "AIModule",

            //"Renderer",
            //"UtilityShaders"
        });

        if (Target.bCompilePhysX)
        {
            PublicDependencyModuleNames.Add("PhysX");
        }

        if (Target.bUseChaos)
        {
            PublicDependencyModuleNames.Add("Chaos");
        }


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            // "Core",
            // "CoreUObject",
            //"Engine",
            "InputCore",
            // "PhysX",
            //"FLEX", remove comment if building in the NVIDIA flex branch - NOTE when put in place FLEX only listed win32 and win64 at compatible platforms
            //"HeadMountedDisplay",
            "RHI",
            "RenderCore",
            // "ShaderCore",
            "NetworkReplayStreaming",
            "AIModule",
            "UMG",
            "GameplayTags"
            //"Renderer",
            // "UtilityShaders"
        });

        if (Target.bCompilePhysX)
        {
            PublicDependencyModuleNames.Add("PhysXVehicles");
        }

        if (Target.bUseChaos)
        {
            //PublicDependencyModuleNames.Add("ChaosVehiclesPlugin");
        }


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            //"CoreUObject",
            //"Engine",
            "Slate",
            "SlateCore"

            // ... add private dependencies that you statically link with here ...
        }
            );

        // Don't load APEX on incompatible platforms

        /* if (
         *   Target.Platform != UnrealTargetPlatform.IOS &&
         *   Target.Platform != UnrealTargetPlatform.TVOS &&
         *   Target.Platform != UnrealTargetPlatform.Android &&
         *   Target.Platform != UnrealTargetPlatform.HTML5)
         * {
         *   PublicDependencyModuleNames.AddRange(
         *   new string[]
         *   {
         *    "APEX"
         *   });
         * }*/

        // Allow gameplay debugger on editor builds
        if (Target.bBuildDeveloperTools || (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test))
        {
            PrivateDependencyModuleNames.Add("GameplayDebugger");
            PublicDefinitions.Add("WITH_GAMEPLAY_DEBUGGER=1"); // Already in AI Module, but gameplay abilities and other modules also duplicate the definition
        }
        else
        {
            PublicDefinitions.Add("WITH_GAMEPLAY_DEBUGGER=0");
        }
    }
    public VRExpansionPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
        //bEnforceIWYU = true;

        PublicDefinitions.Add("WITH_VR_EXPANSION=1");

        // To detect VR Preview, not built out in packaged builds
        if (Target.bBuildEditor == true)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd"
            }
                );
        }

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "Settings"
        }
            );

        PublicIncludePaths.AddRange(
            new string[] {
            //"VRExpansionPlugin/Public",
            //"VRExpansionPlugin/Public/SimpleChar",
            //"HeadMountedDisplay/Public",
            "Runtime/Engine/Private/PhysicsEngine"

            // ... add public include paths required here ...
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            //"VRExpansionPlugin/Private",
            //"VRExpansionPlugin/Private/SimpleChar",
            // ... add other private include paths required here ...
        }
            );

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            // "InputCore",
            "PhysX",
            //"FLEX", remove comment if building in the NVIDIA flex branch - NOTE when put in place FLEX only listed win32 and win64 at compatible platforms
            "HeadMountedDisplay",
            // "RHI",
            //"RenderCore",
            //"ShaderCore",
            //"NetworkReplayStreaming",
            //"AIModule",
            "UMG",
            "NavigationSystem",
            "AIModule",

            //"Renderer",
            //"UtilityShaders"
        });


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            // "Core",
            // "CoreUObject",
            //"Engine",
            "InputCore",
            // "PhysX",
            //"FLEX", remove comment if building in the NVIDIA flex branch - NOTE when put in place FLEX only listed win32 and win64 at compatible platforms
            //"HeadMountedDisplay",
            "RHI",
            "RenderCore",
            "ShaderCore",
            "NetworkReplayStreaming",
            "AIModule",
            "UMG",
            "GameplayTags",
            "PhysXVehicles"

            //"Renderer",
            // "UtilityShaders"
        });



        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            //"CoreUObject",
            //"Engine",
            "Slate",
            "SlateCore"

            // ... add private dependencies that you statically link with here ...
        }
            );

        // Don't load APEX on incompatible platforms
        if (
            Target.Platform != UnrealTargetPlatform.IOS &&
            Target.Platform != UnrealTargetPlatform.TVOS &&
            Target.Platform != UnrealTargetPlatform.Android &&
            Target.Platform != UnrealTargetPlatform.HTML5)
        {
            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "APEX"
            });
        }
    }
        public NvFlow(ReadOnlyTargetRules Target) : base(Target)
        {
            PrivateIncludePaths.AddRange(
                new string[] {
                "NvFlow/Private",
                "../../../../Source/Runtime/Engine/Private",
                "../../../../Source/Runtime/Renderer/Private",
                "../Include/include",
                // ... add other private include paths required here ...
            }
                );

            PublicIncludePaths.AddRange(
                new string[] {
                "NvFlow/Public",
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "RHI",
                "RenderCore",
                "Renderer",
                "ShaderCore",
                "XmlParser",
//                  "UnrealEd",
//                  "AssetTools",
//                  "ContentBrowser",
//                     "EditorStyle"
            }
                );

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "RenderCore",
                "Renderer"
            }
                );

//          PrivateIncludePathModuleNames.AddRange(
//              new string[] {
//                  "AssetTools",
//                  "AssetRegistry"
//              });
//
//          DynamicallyLoadedModuleNames.AddRange(
//              new string[] {
//                  "AssetTools",
//                  "AssetRegistry"
//              });

            PublicDefinitions.Add("WITH_NVFLOW=1");

            string libbase = Target.UEThirdPartySourceDirectory + "../../Plugins/GameWorks/NvFlow/Include";

            if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicLibraryPaths.Add(libbase + "/win32/");
                PublicAdditionalLibraries.Add("NvFlowLibRelease_win32.lib");
                PublicDelayLoadDLLs.Add("NvFlowLibRelease_win32.dll");
                RuntimeDependencies.Add("$(EngineDir)/Plugins/GameWorks/NvFlow/Libraries/win32/NvFlowLibRelease_win32.dll");
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicLibraryPaths.Add(libbase + "/win64/");
                PublicAdditionalLibraries.Add("NvFlowLibRelease_win64.lib");
                PublicDelayLoadDLLs.Add("NvFlowLibRelease_win64.dll");
                RuntimeDependencies.Add("$(EngineDir)/Plugins/GameWorks/NvFlow/Libraries/win64/NvFlowLibRelease_win64.dll");
            }

            // Add direct rendering dependencies on a per-platform basis
            if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
            {
                PrivateDependencyModuleNames.AddRange(new string[] { "DX11", "DX12" });
                PrivateIncludePaths.AddRange(
                    new string[] {
                    // ... add other private include paths required here ...
                }
                    );
            }

            SetupModulePhysXAPEXSupport(Target);
        }
    public modio(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDefinitions.Add("JSON_NOEXCEPTION");
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        // For beeing able to declare something public inside of the module, but private to outsiders
        PrivateDefinitions.Add("MODIO_PACKAGE=1");

        PrivateDependencyModuleNames.AddRange(new string[] { });

#if UE_4_24_OR_LATER
        DefaultBuildSettings = BuildSettingsVersion.V2;
#endif

        LoadModio(Target);

        // @todo: Can we disable exceptions again?
        bEnableExceptions = true;
        // Made sure to disable unity builds, as exclusion of some files causes the project to explode
        // this was we atleast get deterministic builds even if they are slower
        MinSourceFilesForUnityBuildOverride = 256;

        PublicIncludePaths.AddRange(
            new string[] {
            //"modio/Public"

            /*,
             * "Runtime/Core/Public/Modules/",
             * "Editor/UnrealEd/Classes/Factories",
             * "Editor/UnrealEd/Classes",
             * "C:/Users/antar/Documents/Unreal Projects/ModioContainer21/Plugins/modio/Intermediate/Build/Win64/UE4Editor/Inc/modio",
             * "C:/Program Files/Epic Games/UE_4.21/Engine/Intermediate/Build/Win64/UE4Editor/Inc/UnrealEd"
             */
            // ... add public include paths required here ...
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            //"modio/Private",
            // ... add other private include paths required here ...
        }
            );

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "InputCore",
            "Projects",
            "Int64"
            // ... add other public dependencies that you statically link with here ...
        }
            );

        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 ...
        }
            );
    }
    public APEX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        // Determine which kind of libraries to link against
        APEXLibraryMode LibraryMode   = GetAPEXLibraryMode(Target.Configuration);
        string          LibrarySuffix = GetAPEXLibrarySuffix(LibraryMode);

        string ApexVersion = "APEX_1.4";

        string APEXDir = Target.UEThirdPartySourceDirectory + "PhysX3/" + ApexVersion + "/";

        string APEXLibDir = Target.UEThirdPartySourceDirectory + "PhysX3/Lib";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            APEXDir + "include",
            APEXDir + "include/clothing",
            APEXDir + "include/nvparameterized",
            APEXDir + "include/legacy",
            APEXDir + "include/PhysX3",
            APEXDir + "common/include",
            APEXDir + "common/include/autogen",
            APEXDir + "framework/include",
            APEXDir + "framework/include/autogen",
            APEXDir + "shared/general/RenderDebug/public",
            APEXDir + "shared/general/PairFilter/include",
            APEXDir + "shared/internal/include",
        }
            );

        // List of default library names (unused unless LibraryFormatString is non-null)
        List <string> ApexLibraries = new List <string>();

        ApexLibraries.AddRange(
            new string[]
        {
            "ApexCommon{0}",
            "ApexFramework{0}",
            "ApexShared{0}",
            "APEX_Clothing{0}",
        });
        string LibraryFormatString = null;

        bool bIsApexStaticallyLinked = false;
        bool bHasApexLegacy          = true;

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            APEXLibDir += "/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(APEXLibDir);

            PublicAdditionalLibraries.Add(String.Format("APEXFramework{0}_x64.lib", LibrarySuffix));
            PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_x64.dll", LibrarySuffix));

            string[] RuntimeDependenciesX64 =
            {
                "APEX_Clothing{0}_x64.dll",
                "APEX_Legacy{0}_x64.dll",
                "ApexFramework{0}_x64.dll",
            };

            string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win64/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string RuntimeDependency in RuntimeDependenciesX64)
            {
                string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }
            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_APEX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            APEXLibDir += "/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(APEXLibDir);

            PublicAdditionalLibraries.Add(String.Format("APEXFramework{0}_x86.lib", LibrarySuffix));
            PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_x86.dll", LibrarySuffix));

            string[] RuntimeDependenciesX86 =
            {
                "APEX_Clothing{0}_x86.dll",
                "APEX_Legacy{0}_x86.dll",
                "ApexFramework{0}_x86.dll",
            };

            string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win32/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string RuntimeDependency in RuntimeDependenciesX86)
            {
                string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }
            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_APEX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            APEXLibDir += "/Mac";

            ApexLibraries.Clear();
            ApexLibraries.AddRange(
                new string[]
            {
                "ApexCommon{0}",
                "ApexShared{0}",
            });

            LibraryFormatString = APEXLibDir + "/lib{0}" + ".a";

            string[] DynamicLibrariesMac = new string[] {
                "/libAPEX_Clothing{0}.dylib",
                "/libAPEX_Legacy{0}.dylib",
                "/libApexFramework{0}.dylib"
            };

            string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Mac";
            foreach (string Lib in DynamicLibrariesMac)
            {
                string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix);
                PublicDelayLoadDLLs.Add(LibraryPath);
                RuntimeDependencies.Add(LibraryPath);
            }
            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_APEX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            if (Target.Architecture.StartsWith("x86_64"))
            {
                ApexLibraries.Clear();
                string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Linux/" + Target.Architecture;

                string[] DynamicLibrariesLinux =
                {
                    "/libApexCommon{0}.so",
                    "/libApexFramework{0}.so",
                    "/libApexShared{0}.so",
                    "/libAPEX_Legacy{0}.so",
                    "/libAPEX_Clothing{0}.so",
                    "/libNvParameterized{0}.so",
                    "/libRenderDebug{0}.so"
                };

                foreach (string RuntimeDependency in DynamicLibrariesLinux)
                {
                    string LibraryPath = PhysXBinariesDir + String.Format(RuntimeDependency, LibrarySuffix);
                    PublicAdditionalLibraries.Add(LibraryPath);
                    RuntimeDependencies.Add(LibraryPath);
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            bIsApexStaticallyLinked = true;
            bHasApexLegacy          = false;

            APEXLibDir += "/PS4";
            PublicLibraryPaths.Add(APEXLibDir);

            ApexLibraries.Add("NvParameterized{0}");
            ApexLibraries.Add("RenderDebug{0}");

            LibraryFormatString = "{0}";
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            bIsApexStaticallyLinked = true;
            bHasApexLegacy          = false;

            PublicDefinitions.Add("_XBOX_ONE=1");

            // This MUST be defined for XboxOne!
            PublicDefinitions.Add("PX_HAS_SECURE_STRCPY=1");

            APEXLibDir += "/XboxOne/VS2015";
            PublicLibraryPaths.Add(APEXLibDir);

            ApexLibraries.Add("NvParameterized{0}");
            ApexLibraries.Add("RenderDebug{0}");

            LibraryFormatString = "{0}.lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            bIsApexStaticallyLinked = true;
            bHasApexLegacy          = false;

            APEXLibDir += "/Switch";
            PublicLibraryPaths.Add(APEXLibDir);

            ApexLibraries.Add("NvParameterized{0}");
            ApexLibraries.Add("RenderDebug{0}");

            LibraryFormatString = "{0}";
        }

        PublicDefinitions.Add("APEX_UE4=1");

        PublicDefinitions.Add(string.Format("APEX_STATICALLY_LINKED={0}", bIsApexStaticallyLinked ? 1 : 0));
        PublicDefinitions.Add(string.Format("WITH_APEX_LEGACY={0}", bHasApexLegacy ? 1 : 0));

        // Add the libraries needed (used for all platforms except Windows)
        if (LibraryFormatString != null)
        {
            foreach (string Lib in ApexLibraries)
            {
                string ConfiguredLib = String.Format(Lib, LibrarySuffix);
                string FinalLib      = String.Format(LibraryFormatString, ConfiguredLib);
                PublicAdditionalLibraries.Add(FinalLib);
            }
        }
    }
    public bool LoadModio(ReadOnlyTargetRules Target)
    {
        bool isLibrarySupported = false;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicDefinitions.Add("MODIO_UE4_WINDOWS_BUILD");

            isLibrarySupported = true;

            string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "msvc", "x64");
            string DLLPath       = Path.Combine(ThirdPartyPath, modio_directory, "bin", "msvc", "x64");

            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "modio.lib"));
            RuntimeDependencies.Add(Path.Combine(DLLPath, "modio.dll"));

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Win64");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                System.IO.Directory.CreateDirectory(ProjectBinariesDirectory);
            }

            string ModioDLLDestination = System.IO.Path.Combine(ProjectBinariesDirectory, "modio.dll");
            CopyFile(Path.Combine(DLLPath, "modio.dll"), ModioDLLDestination);
            PublicDelayLoadDLLs.AddRange(new string[] { "modio.dll" });
        }

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicDefinitions.Add("MODIO_UE4_LINUX_BUILD");

            isLibrarySupported = true;

            string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "linux", "x64");

            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libmodio.so"));
            RuntimeDependencies.Add(Path.Combine(LibrariesPath, "libmodio.so"));

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Linux");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                System.IO.Directory.CreateDirectory(ProjectBinariesDirectory);
            }
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicDefinitions.Add("MODIO_UE4_MAC_BUILD");

            isLibrarySupported = true;

            string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "macOS", "x64");
            string OrigPath      = Path.Combine(LibrariesPath, "libmodio.dylib");
            string DylibPath     = "Binaries/Mac/libmodio.dylib";
            PublicAdditionalLibraries.Add(Path.Combine(ProjectPath, DylibPath));
            RuntimeDependencies.Add("$(BinaryOutputDir)/libmodio.dylib", OrigPath);

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Mac");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                System.IO.Directory.CreateDirectory(ProjectBinariesDirectory);
            }

            CopyFile(OrigPath, Path.Combine(ProjectPath, "Binaries/Mac/libmodio.dylib"));
        }

        if (isLibrarySupported)
        {
            PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, modio_directory, "include"));
            PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, modio_directory, "additional_dependencies"));
        }

        return(isLibrarySupported);
    }
Exemple #18
0
    public CGAL(ReadOnlyTargetRules Target) : base(Target)
    {
        bEnableUndefinedIdentifierWarnings = false;
        PublicDefinitions.Add("WIN32");
        PublicDefinitions.Add("_WINDOWS");
        PublicDefinitions.Add("_CRT_SECURE_NO_DEPRECATE");
        PublicDefinitions.Add("_SCL_SECURE_NO_DEPRECATE");
        PublicDefinitions.Add("_CRT_SECURE_NO_WARNINGS");
        PublicDefinitions.Add("_SCL_SECURE_NO_WARNINGS");
        PublicDefinitions.Add("CGAL_USE_MPFR");
        PublicDefinitions.Add("CGAL_USE_GMP");

        // Startard Module Dependencies
        PublicDependencyModuleNames.AddRange(new string[] { "Core" });
        PrivateDependencyModuleNames.AddRange(new string[] { "CoreUObject", "Engine", "Slate", "SlateCore" });

        // Start CGAL linking here!
        bool isLibrarySupported = false;

        // Create CGAL Path
        string CGALPath = Path.Combine(ThirdPartyPath, "CGAL");

        // Get Library Path
        string LibPath = "";
        bool   isdebug = Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            LibPath            = Path.Combine(CGALPath, "libraries", "Win64");
            isLibrarySupported = true;
        }
        else
        {
            string Err = string.Format("{0} dedicated server is made to depend on {1}. We want to avoid this, please correct module dependencies.", Target.Platform.ToString(), this.ToString()); System.Console.WriteLine(Err);
        }

        if (isLibrarySupported)
        {
            //Add Include path
            PublicIncludePaths.AddRange(new string[] { Path.Combine(CGALPath, "includes") });
            PublicIncludePaths.AddRange(new string[] { Path.Combine(CGALPath, "includes", "GMP") });//Dependencie

            // Add Library Path
            PublicLibraryPaths.Add(LibPath);

            // Add Dependencies
            if (!isdebug)
            {
                //Add Static Libraries
                PublicAdditionalLibraries.Add(Path.Combine("libgmp-10.lib"));
                PublicAdditionalLibraries.Add(Path.Combine("libmpfr-4.lib"));
                PublicAdditionalLibraries.Add(Path.Combine("libCGAL-vc140-mt-4.9.lib"));
                PublicAdditionalLibraries.Add(Path.Combine("libCGAL_Core-vc140-mt-4.9.lib"));
            }
            else
            {
                //Add Static Libraries (Debug Version)
                PublicAdditionalLibraries.Add(Path.Combine("libgmp-10.lib"));
                PublicAdditionalLibraries.Add(Path.Combine("libmpfr-4.lib"));
                PublicAdditionalLibraries.Add(Path.Combine("libCGAL-vc140-mt-gd-4.9.lib"));
                PublicAdditionalLibraries.Add(Path.Combine("libCGAL_Core-vc140-mt-gd-4.9.lib"));
            }
        }

        PublicDefinitions.Add(string.Format("WITH_CGAL_BINDING={0}", isLibrarySupported ? 1 : 0));
    }
    public SlateCore(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "InputCore",
            "ApplicationCore",
            "Json",
        });

        PrivateIncludePaths.AddRange(
            new string[] {
            "Runtime/SlateCore/Private",
            "Runtime/SlateCore/Private/Animation",
            "Runtime/SlateCore/Private/Application",
            "Runtime/SlateCore/Private/Brushes",
            "Runtime/SlateCore/Private/Fonts",
            "Runtime/SlateCore/Private/Input",
            "Runtime/SlateCore/Private/Layout",
            "Runtime/SlateCore/Private/Logging",
            "Runtime/SlateCore/Private/Rendering",
            "Runtime/SlateCore/Private/Sound",
            "Runtime/SlateCore/Private/Styling",
            "Runtime/SlateCore/Private/Textures",
            "Runtime/SlateCore/Private/Types",
            "Runtime/SlateCore/Private/Widgets",
        });

        PublicDefinitions.Add("SLATE_PARENT_POINTERS=1");

        if (Target.Type != TargetType.Server)
        {
            if (Target.bCompileFreeType)
            {
                AddEngineThirdPartyPrivateStaticDependencies(Target, "FreeType2");
                PublicDefinitions.Add("WITH_FREETYPE=1");
            }
            else
            {
                PublicDefinitions.Add("WITH_FREETYPE=0");
            }

            if (Target.bCompileICU)
            {
                AddEngineThirdPartyPrivateStaticDependencies(Target, "ICU");
            }

            AddEngineThirdPartyPrivateStaticDependencies(Target, "HarfBuzz");
        }
        else
        {
            PublicDefinitions.Add("WITH_FREETYPE=0");
            PublicDefinitions.Add("WITH_HARFBUZZ=0");
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "XInput");
        }
    }
Exemple #20
0
    public Core(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/CorePrivatePCH.h";

        SharedPCHHeaderFile = "Public/CoreSharedPCH.h";

        PublicDependencyModuleNames.Add("BuildSettings");

        PublicDependencyModuleNames.Add("TraceLog");
        PublicIncludePaths.Add("Runtime/TraceLog/Public");

        PrivateIncludePaths.AddRange(
            new string[] {
            //"Developer/DerivedDataCache/Public",
            //"Runtime/SynthBenchmark/Public",
            "Runtime/Core/Private",
            "Runtime/Core/Private/Misc",
            "Runtime/Core/Private/Internationalization",
            "Runtime/Core/Private/Internationalization/Cultures",
            //"Runtime/Engine/Public",
        }
            );

        //PrivateIncludePathModuleNames.AddRange(
        //	new string[] {
        //		"TargetPlatform",
        //		"DerivedDataCache",
        //              "InputDevice",
        //              "Analytics",
        //		"RHI"
        //	}
        //	);

        if (Target.bBuildEditor == true)
        {
            DynamicallyLoadedModuleNames.Add("SourceCodeAccess");

            PrivateIncludePathModuleNames.Add("DirectoryWatcher");
            DynamicallyLoadedModuleNames.Add("DirectoryWatcher");
        }

        if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib");

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "IntelTBB",
                                                         "IntelVTune"
                                                         );

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "mimalloc");

            if (Target.Platform != UnrealTargetPlatform.Win32 && Target.WindowsPlatform.bUseBundledDbgHelp)
            {
                PublicDelayLoadDLLs.Add("DBGHELP.DLL");
                PrivateDefinitions.Add("USE_BUNDLED_DBGHELP=1");
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/DbgHelp/dbghelp.dll");
            }
            else
            {
                PrivateDefinitions.Add("USE_BUNDLED_DBGHELP=0");
            }
            PrivateDefinitions.Add("YIELD_BETWEEN_TASKS=1");
        }
        else if ((Target.Platform == UnrealTargetPlatform.HoloLens))
        {
            PublicIncludePaths.Add("Runtime/Core/Public/HoloLens");
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib");

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "IntelTBB",
                                                         "XInput"
                                                         );
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "IntelTBB",
                                                         "zlib",
                                                         "PLCrashReporter",
                                                         "rd_route"
                                                         );
            PublicFrameworks.AddRange(new string[] { "Cocoa", "Carbon", "IOKit", "Security" });

            if (Target.bBuildEditor == true)
            {
                PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib"
                                                         );
            PublicFrameworks.AddRange(new string[] { "UIKit", "Foundation", "AudioToolbox", "AVFoundation", "GameKit", "StoreKit", "CoreVideo", "CoreMedia", "CoreGraphics", "GameController", "SystemConfiguration", "DeviceCheck", "UserNotifications" });
            if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                PublicFrameworks.AddRange(new string[] { "CoreMotion", "AdSupport", "WebKit" });
                AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                             "PLCrashReporter"
                                                             );
            }

            PrivateIncludePathModuleNames.Add("ApplicationCore");

            bool bSupportAdvertising = Target.Platform == UnrealTargetPlatform.IOS;
            if (bSupportAdvertising)
            {
                PublicFrameworks.AddRange(new string[] { "iAD" });
            }

            // export Core symbols for embedded Dlls
            ModuleSymbolVisibility = ModuleRules.SymbolVisibility.VisibileForDll;
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "cxademangle",
                                                         "zlib",
                                                         "libunwind"
                                                         );
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib",
                                                         "jemalloc"
                                                         );

            // Core uses dlopen()
            PublicSystemLibraries.Add("dl");
        }

        if (Target.bCompileICU == true)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "ICU");
        }
        PublicDefinitions.Add("UE_ENABLE_ICU=" + (Target.bCompileICU ? "1" : "0")); // Enable/disable (=1/=0) ICU usage in the codebase. NOTE: This flag is for use while integrating ICU and will be removed afterward.

        // If we're compiling with the engine, then add Core's engine dependencies
        if (Target.bCompileAgainstEngine == true)
        {
            if (!Target.bBuildRequiresCookedData)
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] { "DerivedDataCache" });
            }
        }


        // On Windows platform, VSPerfExternalProfiler.cpp needs access to "VSPerf.h".  This header is included with Visual Studio, but it's not in a standard include path.
        if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows))
        {
            var VisualStudioVersionNumber = "11.0";
            var SubFolderName             = (Target.Platform == UnrealTargetPlatform.Win32) ? "PerfSDK" : "x64/PerfSDK";

            string PerfIncludeDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), String.Format("Microsoft Visual Studio {0}/Team Tools/Performance Tools/{1}", VisualStudioVersionNumber, SubFolderName));

            if (File.Exists(Path.Combine(PerfIncludeDirectory, "VSPerf.h")))
            {
                PrivateIncludePaths.Add(PerfIncludeDirectory);
                PublicDefinitions.Add("WITH_VS_PERF_PROFILER=1");
            }
            else
            {
                PublicDefinitions.Add("WITH_VS_PERF_PROFILER=0");
            }
        }

        if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            PublicDefinitions.Add("WITH_VS_PERF_PROFILER=0");
        }

        WhitelistRestrictedFolders.Add("Private/NoRedist");

        if (Target.bWithDirectXMath && (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicDefinitions.Add("WITH_DIRECTXMATH=1");
        }
        else
        {
            PublicDefinitions.Add("WITH_DIRECTXMATH=0");
        }

        // Set a macro to allow FApp::GetBuildTargetType() to detect client targts
        if (Target.Type == TargetRules.TargetType.Client)
        {
            PrivateDefinitions.Add("IS_CLIENT_TARGET=1");
        }
        else
        {
            PrivateDefinitions.Add("IS_CLIENT_TARGET=0");
        }

        // Decide if validating memory allocator (aka MallocStomp) can be used on the current platform.
        // Run-time validation must be enabled through '-stompmalloc' command line argument.

        bool bWithMallocStomp = false;

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            if (Target.Platform == UnrealTargetPlatform.Mac ||
                Target.Platform == UnrealTargetPlatform.Linux ||
                Target.Platform == UnrealTargetPlatform.LinuxAArch64 ||
                Target.Platform == UnrealTargetPlatform.Win64)
            // Target.Platform == UnrealTargetPlatform.Win32: // 32-bit windows can technically be supported, but will likely run out of virtual memory space quickly
            // Target.Platform == UnrealTargetPlatform.XboxOne: // XboxOne could be supported, as it's similar enough to Win64
            {
                bWithMallocStomp = true;
            }
        }

        PublicDefinitions.Add("WITH_MALLOC_STOMP=" + (bWithMallocStomp ? "1" : "0"));

        PrivateDefinitions.Add("PLATFORM_COMPILER_OPTIMIZATION_LTCG=" + (Target.bAllowLTCG ? "1" : "0"));
        PrivateDefinitions.Add("PLATFORM_COMPILER_OPTIMIZATION_PG=" + (Target.bPGOOptimize ? "1" : "0"));
        PrivateDefinitions.Add("PLATFORM_COMPILER_OPTIMIZATION_PG_PROFILING=" + (Target.bPGOProfile ? "1" : "0"));

        UnsafeTypeCastWarningLevel = WarningLevel.Warning;
    }
    public libgltf_ue4(TargetInfo Target)
    {
        Type = ModuleType.External;

        string        glTFPath    = System.IO.Path.Combine(ModuleDirectory, "libgltf-0.1.6");
        string        IncludePath = System.IO.Path.Combine(glTFPath, "include");
        List <string> LibPaths    = new List <string>();
        string        LibFilePath = "";

        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            string PlatformName = "";
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win32:
                PlatformName = "win32";
                break;

            case UnrealTargetPlatform.Win64:
                PlatformName = "win64";
                break;
            }

            string TargetConfiguration = "Release";
            string TargetPostfix       = "";
            if (Target.Configuration == UnrealTargetConfiguration.Debug)
            {
                TargetConfiguration = "Debug";
                TargetPostfix       = "d";
            }

            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", PlatformName, "vs2019", TargetConfiguration));

            LibFilePath = "libgltf" + TargetPostfix + ".lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "linux"));

            LibFilePath = "libgltf.a";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "macos"));

            LibFilePath = "libgltf.a";
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "armeabi-v7a"));
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "armeabi-v7a-with-neon"));
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "arm64-v8a"));
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "x86"));
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "x86_64"));

            LibFilePath = "libgltf.a";
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "ios", "os"));
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "ios", "simulator"));
            LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "ios", "watchos"));

            LibFilePath = "libgltf.a";
        }

        PublicIncludePaths.Add(IncludePath);
        PublicLibraryPaths.AddRange(LibPaths);
        PublicAdditionalLibraries.Add(LibFilePath);
        PublicDefinitions.Add("LIBGLTF_CHARACTOR_ENCODING_IS_UTF8");
    }
Exemple #22
0
    public ICU(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        bool bNeedsDlls = false;

        string ICUVersion  = "icu4c-53_1";
        string ICURootPath = Target.UEThirdPartySourceDirectory + "ICU/" + ICUVersion + "/";

        // Includes
        PublicSystemIncludePaths.Add(ICURootPath + "include" + "/");

        string PlatformFolderName = Target.Platform.ToString();

        string TargetSpecificPath = ICURootPath + PlatformFolderName + "/";

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            TargetSpecificPath = ICURootPath + "Linux/";
        }

        // make all Androids use the Android directory
        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            TargetSpecificPath = ICURootPath + "Android/";
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HoloLens))
        {
            string VSVersionFolderName = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            TargetSpecificPath += VSVersionFolderName + "/";

            if (Target.Platform == UnrealTargetPlatform.HoloLens)
            {
                TargetSpecificPath += Target.WindowsPlatform.GetArchitectureSubpath() + "/";
            }
            string[] LibraryNameStems =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            PublicLibraryPaths.Add(TargetSpecificPath + "lib" + "/");

            EICULinkType ICULinkType = (Target.LinkType == TargetLinkType.Monolithic)? EICULinkType.Static : EICULinkType.Dynamic;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "sicu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }

                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "53" + "." + "dll";
                    PublicDelayLoadDLLs.Add(LibraryName);
                }


                if (Target.Platform == UnrealTargetPlatform.Win64 ||
                    Target.Platform == UnrealTargetPlatform.Win32)
                {
                    string BinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/VS{2}/", ICUVersion, Target.Platform.ToString(), Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = BinariesDir + String.Format("icu{0}{1}53.dll", Stem, LibraryNamePostfix);
                        RuntimeDependencies.Add(LibraryName);
                    }
                }
                else if (Target.Platform == UnrealTargetPlatform.HoloLens)
                {
                    string BinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/VS{2}/", ICUVersion, PlatformFolderName, Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
                    if (Target.Platform == UnrealTargetPlatform.HoloLens)
                    {
                        BinariesDir += Target.WindowsPlatform.GetArchitectureSubpath() + "/";
                    }
                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = BinariesDir + String.Format("icu{0}{1}53.dll", Stem, LibraryNamePostfix);
                        RuntimeDependencies.Add(LibraryName);
                    }
                }

                bNeedsDlls = true;

                break;
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix) ||
                 Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            string StaticLibraryExtension = "a";

            if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
            {
                TargetSpecificPath += Target.Architecture + "/";
            }
            else
            {
                PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib");
            }

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            // Temporarily? only link statically on Linux too
            //EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic;
            EICULinkType ICULinkType = EICULinkType.Static;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix;
                    if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
                    {
                        // Linux needs the path, not just the filename, to avoid linking to system lib instead of a bundled one.
                        PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension);
                    }
                    else
                    {
                        // other platforms will just use the library name
                        PublicAdditionalLibraries.Add(LibraryName);
                    }
                }
                break;

            case EICULinkType.Dynamic:
                if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
                {
                    string PathToBinary = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/{2}/", ICUVersion, Target.Platform.ToString(),
                                                        Target.Architecture);

                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = "icu" + Stem + LibraryNamePostfix;
                        string LibraryPath = Target.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

                        PublicLibraryPaths.Add(LibraryPath);
                        PublicAdditionalLibraries.Add(LibraryName);

                        // add runtime dependencies (for staging)
                        RuntimeDependencies.Add(PathToBinary + "lib" + LibraryName + ".so");
                        RuntimeDependencies.Add(PathToBinary + "lib" + LibraryName + ".so.53");                                  // version-dependent
                    }
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            string StaticLibraryExtension  = "a";
            string DynamicLibraryExtension = "dylib";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.IOS || (Target.LinkType == TargetLinkType.Monolithic)) ? EICULinkType.Static : EICULinkType.Dynamic;
            // Library Paths
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "libicu" + Stem + LibraryNamePostfix + "." + StaticLibraryExtension;
                    PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    if (Target.Platform == UnrealTargetPlatform.Mac)
                    {
                        string LibraryName = "libicu" + Stem + ".53.1" + LibraryNamePostfix + "." + DynamicLibraryExtension;
                        string LibraryPath = Target.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName;

                        PublicDelayLoadDLLs.Add(LibraryPath);
                        RuntimeDependencies.Add(LibraryPath);
                    }
                }

                bNeedsDlls = true;

                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            // we don't bother with debug libraries on HTML5. Mainly because debugging isn't viable on html5 currently
            string StaticLibraryExtension = "bc";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };

            string OpimizationSuffix = "";
            if (Target.bCompileForSize)
            {
                OpimizationSuffix = "_Oz";
            }
            else
            {
                if (Target.Configuration == UnrealTargetConfiguration.Development)
                {
                    OpimizationSuffix = "_O2";
                }
                else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                {
                    OpimizationSuffix = "_O3";
                }
            }

            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = "libicu" + Stem + OpimizationSuffix + "." + StaticLibraryExtension;
                PublicAdditionalLibraries.Add(TargetSpecificPath + LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug) ?
                                        "d" : string.Empty;
            string LibraryExtension = "lib";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "PS4/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                       // Data
                "uc",                       // Unicode Common
                "in",                       // Internationalization
                "le",                       // Layout Engine
                "lx",                       // Layout Extensions
                "io"                        // Input/Output
            };
            string LibraryNamePostfix = ""; //(Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty;
            string LibraryExtension   = "a";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "Switch/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Use reflection to allow type not to exist if console code is not present
            System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
            if (XboxOnePlatformType != null)
            {
                string   LibraryNamePrefix = "sicu";
                string[] LibraryNameStems  =
                {
                    "dt",                       // Data
                    "uc",                       // Unicode Common
                    "in",                       // Internationalization
                    "le",                       // Layout Engine
                    "lx",                       // Layout Extensions
                    "io"                        // Input/Output
                };
                string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                            "d" : string.Empty;
                string LibraryExtension = "lib";
                foreach (string Stem in LibraryNameStems)
                {
                    System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                    string        LibraryName = ICURootPath + "XboxOne/VS" + VersionName.ToString() + "/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                    PublicAdditionalLibraries.Add(LibraryName);
                }
            }
        }

        // common defines (this used to be inside an if TargetPlatform == ___ block that looked to include every platform known to man, so just removed the if)
        // Definitions
        PublicDefinitions.Add("U_USING_ICU_NAMESPACE=0");              // Disables a using declaration for namespace "icu".
        PublicDefinitions.Add("U_STATIC_IMPLEMENTATION");              // Necessary for linking to ICU statically.
        PublicDefinitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit");   // Makes UnicodeString constructors for ICU character types explicit.
        PublicDefinitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit.
        PublicDefinitions.Add("UCONFIG_NO_TRANSLITERATION=1");         // Disables declarations and compilation of unused ICU transliteration functionality.


        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            // Definitions
            PublicDefinitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            PublicDefinitions.Add("U_PLATFORM=U_PF_ORBIS");
        }

        if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Definitions
            PublicDefinitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            PublicDefinitions.Add("U_PLATFORM=U_PF_DURANGO");
        }

        PublicDefinitions.Add("NEEDS_ICU_DLLS=" + (bNeedsDlls ? "1" : "0"));
    }
    public CognitoIdentity(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));
        PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));

        PublicDependencyModuleNames.AddRange(new string[] { "Engine", "Core", "CoreUObject", "InputCore", "Projects" });

        // This is required to fix a warning for Unreal Engine 4.21 and later
        PrivatePCHHeaderFile = "Private/CognitoIdentityPrivatePCH.h";

        string BaseDirectory          = System.IO.Path.GetFullPath(System.IO.Path.Combine(ModuleDirectory, "..", ".."));
        string ThirdPartyPath         = System.IO.Path.Combine(BaseDirectory, "ThirdParty", "GameLiftClientSDK", Target.Platform.ToString());
        bool   bIsThirdPartyPathValid = System.IO.Directory.Exists(ThirdPartyPath);

        if (bIsThirdPartyPathValid)
        {
            if (Target.Type == TargetRules.TargetType.Client)
            {
                PublicDefinitions.Add("WITH_COGNITOIDENTITY=1");
                //PublicLibraryPaths.Add(ThirdPartyPath);

                if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    // cognito identity
                    string CognitoSoFile = System.IO.Path.Combine(ThirdPartyPath, "libaws-cpp-sdk-cognito-identity.so");
                    if (File.Exists(CognitoSoFile))
                    {
                        PublicAdditionalLibraries.Add(CognitoSoFile);
                        RuntimeDependencies.Add(CognitoSoFile);
                    }
                    else
                    {
                        throw new BuildException("libaws-cpp-sdk-cognito-identity.so not found. Expected in this location: " + CognitoSoFile);
                    }
                }
                else if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    // cognito identity
                    string CognitoLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-cognito-identity.lib");
                    if (File.Exists(CognitoLibFile))
                    {
                        PublicAdditionalLibraries.Add(CognitoLibFile);
                    }
                    else
                    {
                        throw new BuildException("aws-cpp-sdk-cognito-identity.lib not found. Expected in this location: " + CognitoLibFile);
                    }

                    string CognitoDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-cognito-identity.dll");
                    if (File.Exists(CognitoDLLFile))
                    {
                        PublicDelayLoadDLLs.Add("aws-cpp-sdk-cognito-identity.dll");
                        RuntimeDependencies.Add(CognitoDLLFile);
                    }
                    else
                    {
                        throw new BuildException("aws-cpp-sdk-cognito-identity.dll not found. Expected in this location: " + CognitoDLLFile);
                    }
                }
            }
            else
            {
                PublicDefinitions.Add("WITH_COGNITOIDENTITY=0");
            }
        }
        else
        {
            PublicDefinitions.Add("WITH_COGNITOIDENTITY=0");
        }
    }
Exemple #24
0
    public HotPatcherEditor(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        bLegacyPublicIncludePaths = false;
        OptimizeCode = CodeOptimization.InShippingBuildsOnly;
        if (Target.Version.MajorVersion < 5 && Target.Version.MinorVersion <= 21)
        {
            bUseRTTI = true;
        }

        PublicIncludePaths.AddRange(new string[] { });
        PrivateIncludePaths.AddRange(new string[] {});

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "UnrealEd",
            "UMG",
            "UMGEditor",
            "Core",
            "Json",
            "ContentBrowser",
            "SandboxFile",
            "JsonUtilities",
            "TargetPlatform",
            "DesktopPlatform",
            "Projects",
            "Settings",
            "HTTP",
            "RHI",
            "EngineSettings",
            "AssetRegistry",
            "PakFileUtilities",
            "HotPatcherRuntime",
            "BinariesPatchFeature",
            "HotPatcherCore"
            // ... add other public dependencies that you statically link with here ...
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "UnrealEd",
            "Projects",
            "DesktopPlatform",
            "InputCore",
            "EditorStyle",
            "LevelEditor",
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "RenderCore"
            // ... add private dependencies that you statically link with here ...
        }
            );

        if (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 23)
        {
            PublicDependencyModuleNames.AddRange(new string[] {
                "ToolMenus",
                "TraceLog"
            });
        }

        System.Func <string, bool, bool> AddPublicDefinitions = (string MacroName, bool bEnable) =>
        {
            PublicDefinitions.Add(string.Format("{0}={1}", MacroName, bEnable ? 1 : 0));
            return(true);
        };

        AddPublicDefinitions("ENABLE_COOK_ENGINE_MAP", false);
        AddPublicDefinitions("ENABLE_COOK_PLUGIN_MAP", false);
        BuildVersion Version;

        BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version);
        AddPublicDefinitions("WITH_EDITOR_SECTION", Version.MajorVersion > 4 || Version.MinorVersion > 24);
        // Game feature
        bool bEnableGameFeature = false;

        AddPublicDefinitions("ENGINE_GAME_FEATURE", bEnableGameFeature || (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 26));

        System.Console.WriteLine("MajorVersion {0} MinorVersion: {1} PatchVersion {2}", Target.Version.MajorVersion, Target.Version.MinorVersion, Target.Version.PatchVersion);

        PublicDefinitions.AddRange(new string[]
        {
            "ENABLE_UPDATER_CHECK=1",
            "ENABLE_MULTI_COOKER=0",
            "TOOL_NAME=\"HotPatcher\"",
            "CURRENT_VERSION_ID=75",
            "CURRENT_PATCH_ID=2",
            "REMOTE_VERSION_FILE=\"https://imzlp.com/opensource/version.json\""
        });

        bool bEnablePackageContext = true;

        AddPublicDefinitions("WITH_PACKAGE_CONTEXT", (Version.MajorVersion > 4 || Version.MinorVersion > 23) && bEnablePackageContext);
        if (Version.MajorVersion > 4 || Version.MajorVersion > 26)
        {
            PublicDependencyModuleNames.AddRange(new string[]
            {
                "IoStoreUtilities",
                "UnrealEd"
            });
        }
    }
    public OodleHandlerComponent(ReadOnlyTargetRules Target) : base(Target)
    {
        ShortName = "OodleHC";

        BinariesSubFolder = "NotForLicensees";

        PrivateIncludePaths.Add("OodleHandlerComponent/Private");

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "PacketHandler",
            "Core",
            "CoreUObject",
            "Engine",
            "Analytics"
        });


        bool   bHaveOodleSDK = false;
        string OodleNotForLicenseesLibDir = "";

        // Check the NotForLicensees folder first
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "win", "lib");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "Linux", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "ps4", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "XboxOne", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "Mac", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "Android", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "IOS", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "255", "Switch", "lib");
        }

        if (OodleNotForLicenseesLibDir.Length > 0)
        {
            try
            {
                bHaveOodleSDK = System.IO.Directory.Exists(OodleNotForLicenseesLibDir);
            }
            catch (System.Exception)
            {
            }
        }

        if (bHaveOodleSDK)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "Oodle");
            PublicIncludePathModuleNames.Add("Oodle");
            PublicDefinitions.Add("HAS_OODLE_SDK=1");
        }
        else
        {
            PublicDefinitions.Add("HAS_OODLE_SDK=0");
        }
    }
        public NodeGraphAssistant(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
            string enginePath = Path.GetFullPath(Target.RelativeEnginePath);

            PublicIncludePaths.AddRange(
                new string[] {
                // ... add public include paths required here ...
            }
                );

            PrivateIncludePaths.AddRange(
                new string[] {
                enginePath + "Source/Runtime/Core/Public",
                enginePath + "Source/Runtime/Projects/Public",
                enginePath + "Source/Runtime/Projects/Public/Interfaces",
                enginePath + "Source/Runtime/Engine/Classes",
                enginePath + "Source/Runtime/Engine/Public",
                enginePath + "Source/Runtime/SlateCore/Public/Styling",
                enginePath + "Source/Runtime/Slate/Public/Framework/Application",
                enginePath + "Source/Runtime/Slate/Public/Framework",
                enginePath + "Source/Runtime/SlateCore/Public",
                enginePath + "Source/Editor/UnrealEd/Public",
                enginePath + "Source/Editor/UnrealEd/Classes",
                enginePath + "Source/Editor/GraphEditor/Public",
                enginePath + "Source/Editor/EditorStyle/Public",
                enginePath + "Source/Editor/MaterialEditor/Public",
                enginePath + "Source/Editor/AnimationBlueprintEditor/Public",
                enginePath + "Source/Editor/Kismet/Public",
                enginePath + "Source/Editor/BlueprintGraph/Classes",
                enginePath + "Source/Editor/KismetWidgets/Public",

                //enginePath+"Source/Editor/PropertyEditor/Public",
            }
                );
            PrivateIncludePaths.Add(enginePath + "Source/Editor/GraphEditor/Private");
            PrivateIncludePaths.Add(enginePath + "Source/Runtime/Launch/Resources");
            PrivateIncludePaths.Add(enginePath + "Source/Runtime/Engine/Classes/EdGraph");
            PrivateIncludePaths.Add(enginePath + "Source/Editor/AnimationBlueprintEditor/Private");
            PrivateIncludePaths.Add(enginePath + "Source/Editor/AudioEditor/Private");
            PrivateIncludePaths.Add(enginePath + "Source/Editor/UnrealEd/Private");

            //PrivateIncludePaths.Add(enginePath + "Plugins/FX/Niagara/Source/NiagaraEditor/Public");

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Core", "CoreUObject", "Slate", "SlateCore", "UnrealEd", "GraphEditor",
                "InputCore", "EditorStyle", "Engine", "AnimGraph", "Projects",
                "MaterialEditor", "BlueprintGraph", "AnimationBlueprintEditor", "AudioEditor", "KismetWidgets"
                //"PropertyEditor","AppFramework","NiagaraEditor",
                // ... add private dependencies that you statically link with here ...
            }
                );
#if UE_4_17_OR_LATER
            PrivateDependencyModuleNames.Add("ApplicationCore");
#endif

            //some classes is not exported from engine, so when build with release engine it can not find the implementation.
            if (File.Exists(enginePath + "Source/Editor/GraphEditor/Private/DragConnection.cpp"))
            {
#if UE_4_17_OR_LATER
                PublicDefinitions.Add("NGA_WITH_ENGINE_CPP");
#else
                Definitions.Add("NGA_WITH_ENGINE_CPP");
#endif
            }
            else
            {
                Log.TraceInformation("one or more engine cpp files not found.");
                Log.TraceInformation("will use pre-copied source files inside plugin source folder.");
                Log.TraceInformation("turn on \"download source code\" option when installing engine if problem occured.");
            }

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
                // ... add any modules that your module loads dynamically here ...
            }
                );
        }
    public NuGetModule(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
        }
            );

        // WinRT with Nuget support
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            // these parameters mandatory for winrt support
            bEnableExceptions = true;
            bUseUnity         = false;
            CppStandard       = CppStandardVersion.Cpp17;
            PublicSystemLibraries.AddRange(new string [] { "shlwapi.lib", "runtimeobject.lib" });

            // prepare everything for nuget
            string MyModuleName = GetType().Name;
            string NugetFolder  = Path.Combine(PluginDirectory, "Intermediate", "Nuget", MyModuleName);
            Directory.CreateDirectory(NugetFolder);

            string BinariesSubFolder = Path.Combine("Binaries", "ThirdParty", Target.Type.ToString(), Target.Platform.ToString(), Target.Architecture);

            PublicDefinitions.Add(string.Format("THIRDPARTY_BINARY_SUBFOLDER=\"{0}\"", BinariesSubFolder.Replace(@"\", @"\\")));

            string BinariesFolder = Path.Combine(PluginDirectory, BinariesSubFolder);
            Directory.CreateDirectory(BinariesFolder);

            ExternalDependencies.Add("packages.config");

            // download nuget
            string NugetExe = Path.Combine(NugetFolder, "nuget.exe");
            if (!File.Exists(NugetExe))
            {
                using (System.Net.WebClient myWebClient = new System.Net.WebClient())
                {
                    // we aren't focusing on a specific nuget version, we can use any of them but the latest one is preferable
                    myWebClient.DownloadFile(@"https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", NugetExe);
                }
            }

            // run nuget to update the packages
            {
                var StartInfo = new System.Diagnostics.ProcessStartInfo(NugetExe, string.Format("install \"{0}\" -OutputDirectory \"{1}\"", Path.Combine(ModuleDirectory, "packages.config"), NugetFolder));
                StartInfo.UseShellExecute = false;
                StartInfo.CreateNoWindow  = true;
                var ExitCode = Utils.RunLocalProcessAndPrintfOutput(StartInfo);
                if (ExitCode < 0)
                {
                    throw new BuildException("Failed to get nuget packages.  See log for details.");
                }
            }

            // get list of the installed packages, that's needed because the code should get particular versions of the installed packages
            string[] InstalledPackages = Utils.RunLocalProcessAndReturnStdOut(NugetExe, string.Format("list -Source \"{0}\"", NugetFolder)).Split(new char[] { '\r', '\n' });

            // winmd files of the packages
            List <string> WinMDFiles = new List <string>();

            // WinRT lib for some job
            string QRPackage = InstalledPackages.FirstOrDefault(x => x.StartsWith("Microsoft.MixedReality.QR"));
            if (!string.IsNullOrEmpty(QRPackage))
            {
                string QRFolderName = QRPackage.Replace(" ", ".");

                // copying dll and winmd binaries to our local binaries folder
                // !!!!! please make sure that you use the path of file! Unreal can't do it for you !!!!!
                string WinMDFile = Path.Combine(NugetFolder, QRFolderName, @"lib\uap10.0.18362\Microsoft.MixedReality.QR.winmd");
                SafeCopy(WinMDFile, Path.Combine(BinariesFolder, "Microsoft.MixedReality.QR.winmd"));

                SafeCopy(Path.Combine(NugetFolder, QRFolderName, string.Format(@"runtimes\win10-{0}\native\Microsoft.MixedReality.QR.dll", Target.WindowsPlatform.Architecture.ToString())),
                         Path.Combine(BinariesFolder, "Microsoft.MixedReality.QR.dll"));

                // also both both binaries must be in RuntimeDependencies, unless you get failures in Hololens platform
                RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.MixedReality.QR.dll"));
                RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.MixedReality.QR.winmd"));

                //add winmd file to the list for further processing using cppwinrt.exe
                WinMDFiles.Add(WinMDFile);
            }

            string ASAPackage = InstalledPackages.FirstOrDefault(x => x.StartsWith("Microsoft.Azure.SpatialAnchors.WinRT"));
            if (!string.IsNullOrEmpty(ASAPackage))
            {
                string ASAFolderName = ASAPackage.Replace(" ", ".");

                // copying dll and winmd binaries to our local binaries folder
                // !!!!! please make sure that you use the path of file! Unreal can't do it for you !!!!!
                string WinMDFile = Path.Combine(NugetFolder, ASAFolderName, @"lib\uap10.0\Microsoft.Azure.SpatialAnchors.winmd");
                SafeCopy(WinMDFile, Path.Combine(BinariesFolder, "Microsoft.Azure.SpatialAnchors.winmd"));

                SafeCopy(Path.Combine(NugetFolder, ASAFolderName, string.Format(@"runtimes\win10-{0}\native\Microsoft.Azure.SpatialAnchors.dll", Target.WindowsPlatform.Architecture.ToString())),
                         Path.Combine(BinariesFolder, "Microsoft.Azure.SpatialAnchors.dll"));

                SafeCopy(Path.Combine(NugetFolder, ASAFolderName, string.Format(@"runtimes\win10-{0}\native\CoarseRelocUW.dll", Target.WindowsPlatform.Architecture.ToString())),
                         Path.Combine(BinariesFolder, "CoarseRelocUW.dll"));

                // also all binaries must be in RuntimeDependencies
                RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.Azure.SpatialAnchors.dll"));
                RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.Azure.SpatialAnchors.winmd"));
                RuntimeDependencies.Add(Path.Combine(BinariesFolder, "CoarseRelocUW.dll"));

                // add winmd file to the list for further processing using cppwinrt.exe
                WinMDFiles.Add(WinMDFile);
            }

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                // Microsoft.VCRTForwarders.140 is needed to run WinRT dlls in Win64 platforms
                string VCRTForwardersPackage = InstalledPackages.FirstOrDefault(x => x.StartsWith("Microsoft.VCRTForwarders.140"));
                if (!string.IsNullOrEmpty(VCRTForwardersPackage))
                {
                    string VCRTForwardersName = VCRTForwardersPackage.Replace(" ", ".");
                    foreach (var Dll in Directory.EnumerateFiles(Path.Combine(NugetFolder, VCRTForwardersName, "runtimes/win10-x64/native/release"), "*_app.dll"))
                    {
                        string newDll = Path.Combine(BinariesFolder, Path.GetFileName(Dll));
                        SafeCopy(Dll, newDll);
                        RuntimeDependencies.Add(newDll);
                    }
                }

                string RemotingPackage = InstalledPackages.FirstOrDefault(x => x.StartsWith("Microsoft.Holographic.Remoting.OpenXr"));
                if (!string.IsNullOrEmpty(RemotingPackage))
                {
                    string RemotingFolderName = RemotingPackage.Replace(" ", ".");

                    SafeCopy(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\bin\x64\Desktop\Microsoft.Holographic.AppRemoting.OpenXr.dll"),
                             Path.Combine(BinariesFolder, "Microsoft.Holographic.AppRemoting.OpenXr.dll"));

                    SafeCopy(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\bin\x64\Desktop\RemotingXR.json"),
                             Path.Combine(BinariesFolder, "RemotingXR.json"));

                    PublicIncludePaths.Add(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\include\openxr"));

                    RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.Holographic.AppRemoting.OpenXr.dll"));
                    RuntimeDependencies.Add(Path.Combine(BinariesFolder, "RemotingXR.json"));
                }
            }

            // get WinRT package
            string CppWinRTPackage = InstalledPackages.FirstOrDefault(x => x.StartsWith("Microsoft.Windows.CppWinRT"));
            if (!string.IsNullOrEmpty(CppWinRTPackage))
            {
                string CppWinRTName   = CppWinRTPackage.Replace(" ", ".");
                string CppWinRTExe    = Path.Combine(NugetFolder, CppWinRTName, "bin", "cppwinrt.exe");
                string CppWinRTFolder = Path.Combine(PluginDirectory, "Intermediate", CppWinRTName, MyModuleName);
                Directory.CreateDirectory(CppWinRTFolder);

                // all downloaded winmd file with WinSDK to be processed by cppwinrt.exe
                var WinMDFilesStringbuilder = new System.Text.StringBuilder();
                foreach (var winmd in WinMDFiles)
                {
                    WinMDFilesStringbuilder.Append(" -input \"");
                    WinMDFilesStringbuilder.Append(winmd);
                    WinMDFilesStringbuilder.Append("\"");
                }

                // generate winrt headers and add them into include paths
                var StartInfo = new System.Diagnostics.ProcessStartInfo(CppWinRTExe, string.Format("{0} -input \"{1}\" -output \"{2}\"", WinMDFilesStringbuilder, Target.WindowsPlatform.WindowsSdkVersion, CppWinRTFolder));
                StartInfo.UseShellExecute = false;
                StartInfo.CreateNoWindow  = true;
                var ExitCode = Utils.RunLocalProcessAndPrintfOutput(StartInfo);
                if (ExitCode < 0)
                {
                    throw new BuildException("Failed to get generate WinRT headers.  See log for details.");
                }

                PublicIncludePaths.Add(CppWinRTFolder);
            }
            else
            {
                // fall back to default WinSDK headers if no winrt package in our list
                PublicIncludePaths.Add(Path.Combine(Target.WindowsPlatform.WindowsSdkDir, "Include", Target.WindowsPlatform.WindowsSdkVersion, "cppwinrt"));
            }
        }
    }
    public Core(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/CorePrivatePCH.h";

        SharedPCHHeaderFile = "Public/CoreSharedPCH.h";

        bAddDefaultIncludePaths = false;

        PublicIncludePaths.AddRange(
            new string[] {
            "Runtime/Core/Public",
            "Runtime/Core/Public/Internationalization",
            "Runtime/Core/Public/Async",
            "Runtime/Core/Public/Concurrency",
            "Runtime/Core/Public/Containers",
            "Runtime/Core/Public/Delegates",
            "Runtime/Core/Public/GenericPlatform",
            "Runtime/Core/Public/HAL",
            "Runtime/Core/Public/Logging",
            "Runtime/Core/Public/Math",
            "Runtime/Core/Public/Misc",
            "Runtime/Core/Public/Modules",
            "Runtime/Core/Public/Modules/Boilerplate",
            "Runtime/Core/Public/ProfilingDebugging",
            "Runtime/Core/Public/Serialization",
            "Runtime/Core/Public/Serialization/Csv",
            "Runtime/Core/Public/Stats",
            "Runtime/Core/Public/Templates",
            "Runtime/Core/Public/UObject",
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            "Developer/DerivedDataCache/Public",
            "Runtime/SynthBenchmark/Public",
            "Runtime/Core/Private",
            "Runtime/Core/Private/Misc",
            "Runtime/Core/Private/Serialization/Json",
            "Runtime/Core/Private/Internationalization",
            "Runtime/Core/Private/Internationalization/Cultures",
            "Runtime/Analytics/Public",
            "Runtime/Engine/Public",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "TargetPlatform",
            "DerivedDataCache",
            "InputDevice",
            "Analytics",
            "RHI"
        }
            );

        if (Target.bBuildEditor == true)
        {
            DynamicallyLoadedModuleNames.Add("SourceCodeAccess");

            PrivateIncludePathModuleNames.Add("DirectoryWatcher");
            DynamicallyLoadedModuleNames.Add("DirectoryWatcher");
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicIncludePaths.Add("Runtime/Core/Public/Windows");
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib");

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "IntelTBB",
                                                         "IntelVTune"
                                                         );
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/Mac" });
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "IntelTBB",
                                                         "zlib",
                                                         "PLCrashReporter"
                                                         );
            PublicFrameworks.AddRange(new string[] { "Cocoa", "Carbon", "IOKit", "Security" });

            if (Target.bBuildEditor == true)
            {
                PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/IOS" });
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib"
                                                         );
            PublicFrameworks.AddRange(new string[] { "UIKit", "Foundation", "AudioToolbox", "AVFoundation", "GameKit", "StoreKit", "CoreVideo", "CoreMedia", "CoreGraphics", "GameController", "SystemConfiguration" });
            if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                PublicFrameworks.AddRange(new string[] { "CoreMotion", "AdSupport" });
                AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                             "PLCrashReporter"
                                                             );
            }

            PrivateIncludePathModuleNames.Add("ApplicationCore");

            bool bSupportAdvertising = Target.Platform == UnrealTargetPlatform.IOS;
            if (bSupportAdvertising)
            {
                PublicFrameworks.AddRange(new string[] { "iAD" });
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add("Runtime/Core/Public/Android");
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "cxademangle",
                                                         "zlib"
                                                         );
        }
        else if ((Target.Platform == UnrealTargetPlatform.Linux))
        {
            PublicIncludePaths.Add("Runtime/Core/Public/Linux");
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib",
                                                         "jemalloc",
                                                         "elftoolchain"
                                                         );

            // Core uses dlopen()
            PublicAdditionalLibraries.Add("dl");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PrivateDependencyModuleNames.Add("HTML5JS");
            PrivateDependencyModuleNames.Add("MapPakDownloader");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicAdditionalLibraries.Add("SceRtc_stub_weak"); //ORBIS SDK rtc.h, used in PS4Time.cpp
        }

        if (Target.bCompileICU == true)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "ICU");
        }
        PublicDefinitions.Add("UE_ENABLE_ICU=" + (Target.bCompileICU ? "1" : "0")); // Enable/disable (=1/=0) ICU usage in the codebase. NOTE: This flag is for use while integrating ICU and will be removed afterward.

        // If we're compiling with the engine, then add Core's engine dependencies
        if (Target.bCompileAgainstEngine == true)
        {
            if (!Target.bBuildRequiresCookedData)
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] { "DerivedDataCache" });
            }
        }


        // On Windows platform, VSPerfExternalProfiler.cpp needs access to "VSPerf.h".  This header is included with Visual Studio, but it's not in a standard include path.
        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            var VisualStudioVersionNumber = "11.0";
            var SubFolderName             = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/PerfSDK" : "PerfSDK";

            string PerfIncludeDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), String.Format("Microsoft Visual Studio {0}/Team Tools/Performance Tools/{1}", VisualStudioVersionNumber, SubFolderName));

            if (File.Exists(Path.Combine(PerfIncludeDirectory, "VSPerf.h")))
            {
                PrivateIncludePaths.Add(PerfIncludeDirectory);
                PublicDefinitions.Add("WITH_VS_PERF_PROFILER=1");
            }
            else
            {
                PublicDefinitions.Add("WITH_VS_PERF_PROFILER=0");
            }
        }

        WhitelistRestrictedFolders.Add("Private/NoRedist");

        if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            PublicDefinitions.Add("WITH_DIRECTXMATH=1");
        }
        else if ((Target.Platform == UnrealTargetPlatform.Win64) ||
                 (Target.Platform == UnrealTargetPlatform.Win32))
        {
            // To enable this requires Win8 SDK
            PublicDefinitions.Add("WITH_DIRECTXMATH=0");  // Enable to test on Win64/32.

            //PublicDependencyModuleNames.AddRange(  // Enable to test on Win64/32.
            //    new string[] {
            //    "DirectXMath"
            //});
        }
        else
        {
            PublicDefinitions.Add("WITH_DIRECTXMATH=0");
        }

        // NVCHANGE_BEGIN: Add VXGI
        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicDependencyModuleNames.Add("VXGI");
        }
        // NVCHANGE_END: Add VXGI
    }
    public PhysX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        // Determine which kind of libraries to link against
        PhysXLibraryMode LibraryMode   = GetPhysXLibraryMode(Target.Configuration);
        string           LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode);

        if (LibraryMode == PhysXLibraryMode.Shipping)
        {
            PublicDefinitions.Add("WITH_PHYSX_RELEASE=1");
        }
        else
        {
            PublicDefinitions.Add("WITH_PHYSX_RELEASE=0");
        }

        string PhysXVersion    = "PhysX_3.4";
        string PxSharedVersion = "PxShared";

        string PhysXDir    = Target.UEThirdPartySourceDirectory + "PhysX3/" + PhysXVersion + "/";
        string PxSharedDir = Target.UEThirdPartySourceDirectory + "PhysX3/" + PxSharedVersion + "/";

        string PhysXLibDir    = Target.UEThirdPartySourceDirectory + "PhysX3/Lib/";
        string PxSharedLibDir = Target.UEThirdPartySourceDirectory + "PhysX3/Lib/";

        string PhysXIncludeDir    = PhysXDir + "Include/";
        string PxSharedIncludeDir = PxSharedDir + "include/";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            PxSharedIncludeDir,
            PxSharedIncludeDir + "cudamanager",
            PxSharedIncludeDir + "filebuf",
            PxSharedIncludeDir + "foundation",
            PxSharedIncludeDir + "pvd",
            PxSharedIncludeDir + "task",
            PhysXIncludeDir,
            PhysXIncludeDir + "cooking",
            PhysXIncludeDir + "common",
            PhysXIncludeDir + "extensions",
            PhysXIncludeDir + "geometry"
        }
            );

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PhysXLibDir    += "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PxSharedLibDir += "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesX64 = new string[] {
                "PhysX3{0}_x64.lib",
                "PhysX3Extensions{0}_x64.lib",
                "PhysX3Cooking{0}_x64.lib",
                "PhysX3Common{0}_x64.lib",
                "PsFastXml{0}_x64.lib",
                "PxFoundation{0}_x64.lib",
                "PxPvdSDK{0}_x64.lib",
                "PxTask{0}_x64.lib",
            };

            string[] DelayLoadDLLsX64 = new string[] {
                "PxFoundation{0}_x64.dll",
                "PxPvdSDK{0}_x64.dll",
                "PhysX3{0}_x64.dll",
                "PhysX3Cooking{0}_x64.dll",
                "PhysX3Common{0}_x64.dll",
            };

            string[] PxSharedRuntimeDependenciesX64 = new string[] {
                "PxFoundation{0}_x64.dll",
                "PxPvdSDK{0}_x64.dll",
            };

            foreach (string Lib in StaticLibrariesX64)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX64)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win64/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX64)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }

            string PxSharedBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win64/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in PxSharedRuntimeDependenciesX64)
            {
                RuntimeDependencies.Add(PxSharedBinariesDir + String.Format(DLL, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PhysXLibDir    += "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PxSharedLibDir += "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesX86 = new string[] {
                "PhysX3{0}_x86.lib",
                "PhysX3Extensions{0}_x86.lib",
                "PhysX3Cooking{0}_x86.lib",
                "PhysX3Common{0}_x86.lib",
                "PsFastXml{0}_x86.lib",
                "PxFoundation{0}_x86.lib",
                "PxPvdSDK{0}_x86.lib",
                "PxTask{0}_x86.lib",
            };

            string[] DelayLoadDLLsX86 = new string[] {
                "PxFoundation{0}_x86.dll",
                "PxPvdSDK{0}_x86.dll",
                "PhysX3{0}_x86.dll",
                "PhysX3Cooking{0}_x86.dll",
                "PhysX3Common{0}_x86.dll"
            };

            foreach (string Lib in StaticLibrariesX86)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX86)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win32/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX86)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PhysXLibDir    += "Mac";
            PxSharedLibDir += "Mac";
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesMac = new string[] {
                PhysXLibDir + "/libLowLevel{0}.a",
                PhysXLibDir + "/libLowLevelCloth{0}.a",
                PhysXLibDir + "/libPhysX3Extensions{0}.a",
                PhysXLibDir + "/libSceneQuery{0}.a",
                PhysXLibDir + "/libSimulationController{0}.a",
                PxSharedLibDir + "/libPxTask{0}.a",
                PxSharedLibDir + "/libPsFastXml{0}.a"
            };

            foreach (string Lib in StaticLibrariesMac)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            string[] DynamicLibrariesMac = new string[] {
                "/libPhysX3{0}.dylib",
                "/libPhysX3Cooking{0}.dylib",
                "/libPhysX3Common{0}.dylib",
                "/libPxFoundation{0}.dylib",
                "/libPxPvdSDK{0}.dylib",
            };

            string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Mac";
            foreach (string Lib in DynamicLibrariesMac)
            {
                string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix);
                PublicDelayLoadDLLs.Add(LibraryPath);
                RuntimeDependencies.Add(LibraryPath);
            }

            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x86");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x64");

            PublicLibraryPaths.Add(PxSharedLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/x86");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/arm64");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/x64");

            string[] StaticLibrariesAndroid = new string[] {
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",                 // not needed until Apex
                "PhysX3Common{0}",
                //"PhysXVisualDebuggerSDK{0}",
                "PxFoundation{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            //if you are shipping, and you actually want the shipping libs, you do not need this lib
            if (!(LibraryMode == PhysXLibraryMode.Shipping && Target.bUseShippingPhysXLibraries))
            {
//				PublicAdditionalLibraries.Add("nvToolsExt");
            }

            foreach (string Lib in StaticLibrariesAndroid)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            PhysXLibDir    += "/Linux/" + Target.Architecture;
            PxSharedLibDir += "/Linux/" + Target.Architecture;

            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesPhysXLinux = new string[] {
                "rt",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "PxFoundation{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string Lib in StaticLibrariesPhysXLinux)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "IOS/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "IOS/");
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "TVOS/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "TVOS/");
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "HTML5/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "HTML5/");

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3CharacterKinematic",
                "PhysX3Common",
                "PhysX3Cooking",
                "PhysX3Extensions",
                //"PhysXVisualDebuggerSDK",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            string OpimizationSuffix = "";
            if (Target.bCompileForSize)
            {
                OpimizationSuffix = "_Oz";
            }
            else
            {
                if (Target.Configuration == UnrealTargetConfiguration.Development)
                {
                    OpimizationSuffix = "_O2";
                }
                else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                {
                    OpimizationSuffix = "_O3";
                }
            }

            foreach (var lib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLibDir + lib + OpimizationSuffix + ".bc");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "PS4");

            string[] StaticLibrariesPS4 = new string[] {
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string Lib in StaticLibrariesPS4)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            PublicDefinitions.Add("PX_PHYSX_STATIC_LIB=1");
            PublicDefinitions.Add("_XBOX_ONE=1");

            PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS2015"));

            string[] StaticLibrariesXB1 = new string[] {
                "PhysX3{0}.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}.lib",
                "PhysX3Common{0}.lib",
                "LowLevel{0}.lib",
                "LowLevelAABB{0}.lib",
                "LowLevelCloth{0}.lib",
                "LowLevelDynamics{0}.lib",
                "LowLevelParticles{0}.lib",
                "SceneQuery{0}.lib",
                "SimulationController{0}.lib",
                "PxFoundation{0}.lib",
                "PxTask{0}.lib",
                "PxPvdSDK{0}.lib",
                "PsFastXml{0}.lib"
            };

            foreach (string Lib in StaticLibrariesXB1)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "Switch");
            PublicLibraryPaths.Add(PxSharedLibDir + "Switch");

            string[] StaticLibrariesSwitch = new string[] {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                "PhysX3Cooking",
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string Lib in StaticLibrariesSwitch)
            {
                PublicAdditionalLibraries.Add(Lib + LibrarySuffix);
            }
        }
    }
Exemple #30
0
    public Voxel(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage     = PCHUsageMode.UseExplicitOrSharedPCHs;
        bEnforceIWYU = true;
        bLegacyPublicIncludePaths = false;

#if UE_4_24_OR_LATER
#else
#endif

        PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
        PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));

        // For raytracing
        PrivateIncludePaths.Add(EngineDirectory + "/Shaders/Shared");
        // For HLSL translator
        PrivateIncludePaths.Add(EngineDirectory + "/Source/Runtime/Engine/Private");

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "Networking",
            "Sockets",
            "RHI",
#if UE_4_23_OR_LATER
            "PhysicsCore",
#endif
            "RenderCore",
            "Landscape",
            "PhysX",
#if UE_4_26_OR_LATER
            "DeveloperSettings",
            "TraceLog",
#endif
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "nvTessLib",
            "HTTP",
            "Projects",
            "Slate",
            "SlateCore",
            //"VHACD", // Not used, too slow
        }
            );

        SetupModulePhysicsSupport(Target);

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PrivateDependencyModuleNames.Add("ForsythTriOptimizer");
        }
        PrivateDependencyModuleNames.Add("zlib");

        if (Target.Configuration == UnrealTargetConfiguration.DebugGame ||
            Target.Configuration == UnrealTargetConfiguration.Debug)
        {
            PublicDefinitions.Add("VOXEL_DEBUG=1");
        }

        PublicDefinitions.Add("VOXEL_PLUGIN_NAME=TEXT(\"VoxelFree\")");
    }