public ApexDestructionLib(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        if (Target.bCompileAPEX == false)
        {
            return;
        }
        
        // 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/destructible",
            }
            );

        // List of default library names (unused unless LibraryFormatString is non-null)
        List<string> ApexLibraries = new List<string>();
        ApexLibraries.AddRange(
            new string[]
            {
                "APEX_Destructible{0}",
            });
        string LibraryFormatString = null;
        

        // 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_Destructible{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);
            }

        }
        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_Destructible{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);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            APEXLibDir += "/Mac";

            string[] DynamicLibrariesMac = new string[] {
                "/libAPEX_Destructible{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(new RuntimeDependency(LibraryPath));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.Architecture.StartsWith("x86_64"))
            {
                APEXLibDir += "/Linux/" + Target.Architecture;
                ApexLibraries.Add("APEX_Destructible{0}");
                LibraryFormatString = APEXLibDir + "/lib{0}" + ".a";
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            APEXLibDir += "/PS4";
            PublicLibraryPaths.Add(APEXLibDir);

            LibraryFormatString = "{0}";
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            APEXLibDir += "/XboxOne/VS2015";
            PublicLibraryPaths.Add(APEXLibDir);

            LibraryFormatString = "{0}.lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            APEXLibDir += "/Switch";
            PublicLibraryPaths.Add(APEXLibDir);

            LibraryFormatString = "{0}";
        }

        // Add the libraries needed (used for all platforms except Windows and Mac)
        if (LibraryFormatString != null)
        {
            foreach (string Lib in ApexLibraries)
            {
                string ConfiguredLib = String.Format(Lib, LibrarySuffix);
                string FinalLib = String.Format(LibraryFormatString, ConfiguredLib);
                PublicAdditionalLibraries.Add(FinalLib);
            }
        }
    }
Exemplo n.º 2
0
    public VorbisFile(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

        PublicIncludePaths.Add(VorbisPath + "include");
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string VorbisLibPath = VorbisPath + "Lib/win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            PublicLibraryPaths.Add(VorbisLibPath);
            PublicAdditionalLibraries.Add("libvorbisfile_64.lib");
            PublicDelayLoadDLLs.Add("libvorbisfile_64.dll");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Vorbis/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libvorbisfile_64.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            string VorbisLibPath = VorbisPath + "Lib/win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            PublicLibraryPaths.Add(VorbisLibPath);
            PublicAdditionalLibraries.Add("libvorbisfile.lib");
            PublicDelayLoadDLLs.Add("libvorbisfile.dll");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Vorbis/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libvorbisfile.dll");
        }
        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 + "libvorbisfile" + OpimizationSuffix + ".bc");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // filtered in toolchain
            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("vorbisfile");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicAdditionalLibraries.Add(VorbisPath + "lib/Linux/" + Target.Architecture + "/libvorbisfile.a");
            PublicAdditionalLibraries.Add(VorbisPath + "lib/Linux/" + Target.Architecture + "/libvorbisenc.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("libvorbisfile_static.lib");
            }
        }
    }
Exemplo n.º 3
0
    public HapticsManager(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
        PrivatePCHHeaderFile = "Public/HapticsManager.h";

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

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

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "Settings",
            "Launch",
        }
            );
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "HapticsManager",
            //"System",
            // ... add other public dependencies that you statically link with here ...
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "HapticsManager",
            "Json",
            "JsonUtilities",
            "Projects",
            "InputCore",
            "HapticLibrary"
            //"Sockets",
            // ... add private dependencies that you statically link with here ...
        }
            );


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

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../DLLs/win64/haptic_library.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../DLLs/win32/haptic_library.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "HapticsManager_APL.xml"));
        }
    }
    public Engine(TargetInfo Target)
    {
        PrivatePCHHeaderFile = "Private/EnginePrivatePCH.h";

        SharedPCHHeaderFile = "Public/EngineSharedPCH.h";

        PublicIncludePathModuleNames.AddRange(new string[] { "Renderer", "PacketHandler", "NetworkReplayStreaming" });

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

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "TargetPlatform",
            "ImageWrapper",
            "HeadMountedDisplay",
            "Advertising",
            "NetworkReplayStreaming",
            "MovieSceneCapture",
            "AutomationWorker",
            "MovieSceneCapture",
            "DesktopPlatform",
        }
            );

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

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "SlateReflector",
            }
                );

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

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "Json",
            "SlateCore",
            "Slate",
            "InputCore",
            "Messaging",
            "RenderCore",
            "RHI",
            "ShaderCore",
            "AssetRegistry",                     // Here until FAssetData is moved to engine
            "EngineMessages",
            "EngineSettings",
            "SynthBenchmark",
            "GameplayTags",
            "AIModule",
            "DatabaseSupport",
            "PacketHandler",
            "HardwareSurvey",
        }
            );

        if (Target.Type == TargetRules.TargetType.Editor)
        {
            PrivateIncludePathModuleNames.AddRange(new string[] { "CrashTracker" });
            DynamicallyLoadedModuleNames.AddRange(new string[] { "CrashTracker" });
            PublicDependencyModuleNames.AddRange(
                new string[] {
            }
                );
        }


        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "AppFramework",
            "Networking",
            "Sockets",
            "Landscape",
            "UMG",
            "Projects",
            "Internationalization",
            "MaterialShaderQualitySettings",
            "CinematicCamera",
            "Analytics",
            "AnalyticsET",
        }
            );

        // to prevent "causes WARNING: Non-editor build cannot depend on non-redistributable modules."
        if (Target.Type == TargetRules.TargetType.Editor)
        {
            // for now we depend on this
            PrivateDependencyModuleNames.Add("RawMesh");
        }

        bool bVariadicTemplatesSupported = true;

        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);
                if (VersionName.ToString().Equals("2012"))
                {
                    bVariadicTemplatesSupported = false;
                }
            }
        }

        if (bVariadicTemplatesSupported)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "MessagingRpc",
                "PortalRpc",
                "PortalServices",
            }
                );

            if (Target.Type == TargetRules.TargetType.Editor)
            {
                // these modules require variadic templates
                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "MessagingRpc",
                    "PortalRpc",
                    "PortalServices",
                }
                    );
            }
        }

        CircularlyReferencedDependentModules.Add("GameplayTags");
        CircularlyReferencedDependentModules.Add("AIModule");
        CircularlyReferencedDependentModules.Add("Landscape");
        CircularlyReferencedDependentModules.Add("UMG");
        CircularlyReferencedDependentModules.Add("MaterialShaderQualitySettings");
        CircularlyReferencedDependentModules.Add("CinematicCamera");

        // The AnimGraphRuntime module is not needed by Engine proper, but it is loaded in LaunchEngineLoop.cpp,
        // and needs to be listed in an always-included module in order to be compiled into standalone games
        DynamicallyLoadedModuleNames.Add("AnimGraphRuntime");
        // So does Geometry Cache
        DynamicallyLoadedModuleNames.Add("GeometryCache");

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "MovieScene",
            "MovieSceneCapture",
            "MovieSceneTracks",
            "HeadMountedDisplay",
            "StreamingPauseRendering",
        }
            );

        PrivateIncludePathModuleNames.Add("LightPropagationVolumeRuntime");

        if (Target.Type != TargetRules.TargetType.Server)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "SlateNullRenderer",
                "SlateRHIRenderer"
            }
                );

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

        if (Target.Type == TargetRules.TargetType.Server || Target.Type == TargetRules.TargetType.Editor)
        {
            PrivateDependencyModuleNames.Add("PerfCounters");
        }

        if (UEBuildConfiguration.bBuildDeveloperTools)
        {
            // Add "BlankModule" so that it gets compiled as an example and will be maintained and tested.  This can be removed
            // at any time if needed.  The module isn't actually loaded by the engine so there is no runtime cost.
            DynamicallyLoadedModuleNames.Add("BlankModule");

            if (Target.Type != TargetRules.TargetType.Server)
            {
                PrivateIncludePathModuleNames.Add("MeshUtilities");
                DynamicallyLoadedModuleNames.Add("MeshUtilities");

                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "ImageCore",
                    "RawMesh"
                });
            }

            if (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test && Target.Type != TargetRules.TargetType.Server)
            {
                PrivateDependencyModuleNames.Add("CollisionAnalyzer");
                CircularlyReferencedDependentModules.Add("CollisionAnalyzer");

                PrivateDependencyModuleNames.Add("LogVisualizer");
                CircularlyReferencedDependentModules.Add("LogVisualizer");
            }

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "WindowsTargetPlatform",
                    "WindowsNoEditorTargetPlatform",
                    "WindowsServerTargetPlatform",
                    "WindowsClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "MacTargetPlatform",
                    "MacNoEditorTargetPlatform",
                    "MacServerTargetPlatform",
                    "MacClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "LinuxTargetPlatform",
                    "LinuxNoEditorTargetPlatform",
                    "LinuxServerTargetPlatform",
                    "LinuxClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                }
                    );
            }
        }

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
            "NetworkReplayStreaming",
            "NullNetworkReplayStreaming",
            "HttpNetworkReplayStreaming",
            "Advertising"
        }
            );

        if (Target.Type.Value != TargetRules.TargetType.Server)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "ImageWrapper",
                "GameLiveStreaming"
            }
                );
        }

        if (!UEBuildConfiguration.bBuildRequiresCookedData && UEBuildConfiguration.bCompileAgainstEngine)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "DerivedDataCache",
                "TargetPlatform",
                "DesktopPlatform"
            }
                );
        }

        if (UEBuildConfiguration.bBuildEditor == true)
        {
            PublicDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                ); // @todo api: Only public because of WITH_EDITOR and UNREALED_API

            CircularlyReferencedDependentModules.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                );

            PrivateIncludePathModuleNames.Add("TextureCompressor");
            PrivateIncludePaths.Add("Developer/TextureCompressor/Public");

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

        SetupModulePhysXAPEXSupport(Target);
        if (UEBuildConfiguration.bCompilePhysX && UEBuildConfiguration.bRuntimePhysicsCooking)
        {
            DynamicallyLoadedModuleNames.Add("PhysXFormats");
            PrivateIncludePathModuleNames.Add("PhysXFormats");
        }


        SetupModuleBox2DSupport(Target);

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "libOpus",
                                                         "OpenSubdiv"
                                                         );

            if (UEBuildConfiguration.bCompileLeanAndMeanUE == false)
            {
                AddEngineThirdPartyPrivateStaticDependencies(Target, "DirectShow");
            }

            // Head Mounted Display support
//            PrivateIncludePathModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
//            DynamicallyLoadedModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
        }

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile"
                                                         );
        }
        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32")
        {
            PublicDependencyModuleNames.Add("HTML5JS");
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "libOpus"
                                                         );
            PublicFrameworks.AddRange(new string[] { "AVFoundation", "CoreVideo", "CoreMedia" });
        }

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile"
                                                         );
        }

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "libOpus"
                                                         );
        }

        if (UEBuildConfiguration.bCompileRecast)
        {
            PrivateDependencyModuleNames.Add("Navmesh");
            Definitions.Add("WITH_RECAST=1");
        }
        else
        {
            // Because we test WITH_RECAST in public Engine header files, we need to make sure that modules
            // that import this also have this definition set appropriately.  Recast is a private dependency
            // module, so it's definitions won't propagate to modules that import Engine.
            Definitions.Add("WITH_RECAST=0");
        }

        // Add a reference to the stats HTML files referenced by UEngine::DumpFPSChartToHTML. Previously staged by CopyBuildToStagingDirectory.
        if (UEBuildConfiguration.bBuildEditor || Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            RuntimeDependencies.Add("$(EngineDir)/Content/Stats/...", StagedFileType.UFS);
        }

        DynamicallyLoadedModuleNames.Add("Niagara");
    }
        public WindowsMixedRealityHMD(ReadOnlyTargetRules Target) : base(Target)
        {
            bEnableExceptions = true;

            if (Target.Platform == UnrealTargetPlatform.Win32 ||
                Target.Platform == UnrealTargetPlatform.Win64 ||
                Target.Platform == UnrealTargetPlatform.HoloLens)
            {
                PublicDependencyModuleNames.AddRange(
                    new string[]
                {
                    "HeadMountedDisplay",
                    "ProceduralMeshComponent",
                    "MixedRealityInteropLibrary",
                    "InputDevice",
                }
                    );

                PrivateDependencyModuleNames.AddRange(
                    new string[]
                {
                    "Core",
                    "CoreUObject",
                    "ApplicationCore",
                    "Engine",
                    "InputCore",
                    "RHI",
                    "RenderCore",
                    "Renderer",
                    "HeadMountedDisplay",
                    "D3D11RHI",
                    "Slate",
                    "SlateCore",
                    "UtilityShaders",
                    "Projects",
                    "WindowsMixedRealityHandTracking",
                    "AugmentedReality",
                }
                    );

                if (Target.Platform == UnrealTargetPlatform.Win64 ||
                    Target.Platform == UnrealTargetPlatform.HoloLens)
                {
                    PrivateDependencyModuleNames.Add("HoloLensAR");
                }

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

                if (Target.Platform != UnrealTargetPlatform.HoloLens)
                {
                    AddEngineThirdPartyPrivateStaticDependencies(Target, "NVAftermath");
                    AddEngineThirdPartyPrivateStaticDependencies(Target, "IntelMetricsDiscovery");
                }

                AddEngineThirdPartyPrivateStaticDependencies(Target, "WindowsMixedRealityInterop");

                LoadMixedReality(Target);

                PrivateIncludePaths.AddRange(
                    new string[]
                {
                    "WindowsMixedRealityHMD/Private",
                    "../../../../Source/Runtime/Windows/D3D11RHI/Private",
                    "../../../../Source/Runtime/Renderer/Private",
                });

                if (Target.Platform == UnrealTargetPlatform.Win32 ||
                    Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PrivateIncludePaths.Add("../../../../Source/Runtime/Windows/D3D11RHI/Private/Windows");
                }
                else if (Target.Platform == UnrealTargetPlatform.HoloLens)
                {
                    PrivateIncludePaths.Add("../../../../Source/Runtime/Windows/D3D11RHI/Private/HoloLens");
                }

                bFasterWithoutUnity = true;

                PCHUsage             = PCHUsageMode.NoSharedPCHs;
                PrivatePCHHeaderFile = "Private/WindowsMixedRealityPrecompiled.h";
            }

            if (Target.Platform == UnrealTargetPlatform.Win64 || (Target.Platform == UnrealTargetPlatform.HoloLens && Target.WindowsPlatform.Architecture == WindowsArchitecture.x64))
            {
                PublicDelayLoadDLLs.Add("QRCodesTrackerPlugin.dll");
                RuntimeDependencies.Add(Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "QRCodesTrackerPlugin.dll"));
            }
            else if (Target.Platform == UnrealTargetPlatform.HoloLens)
            {
                PublicDelayLoadDLLs.Add("QRCodesTrackerPlugin.dll");
                RuntimeDependencies.Add(Path.Combine("$(EngineDir)/Binaries/ThirdParty/HoloLens/ARM64", "QRCodesTrackerPlugin.dll"));
            }

            // Add a dependency to SceneUnderstanding.dll if present
            string SceneUnderstandingPath = Path.Combine(Target.UEThirdPartyBinariesDirectory, "HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "SceneUnderstanding.dll");

            if (File.Exists(SceneUnderstandingPath))
            {
                PublicDelayLoadDLLs.Add("SceneUnderstanding.dll");
                RuntimeDependencies.Add(SceneUnderstandingPath);
                PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=1");
            }
            else
            {
                PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=0");
            }
        }
Exemplo n.º 6
0
    public ICU(TargetInfo Target)
    {
        Type = ModuleType.External;

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

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

        string PlatformFolderName = Target.Platform.ToString();

        string TargetSpecificPath = ICURootPath + PlatformFolderName + "/";

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            TargetSpecificPath = ICURootPath + "Win32/";
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            TargetSpecificPath += VSVersionFolderName + "/";

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

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

            EICULinkType ICULinkType = Target.IsMonolithic ? 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(), WindowsPlatform.GetVisualStudioCompilerVersionName());
                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = BinariesDir + String.Format("icu{0}{1}53.dll", Stem, LibraryNamePostfix);
                        RuntimeDependencies.Add(new RuntimeDependency(LibraryName));
                    }
                }

                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Android)
        {
            string StaticLibraryExtension = "a";

            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Linux:
                TargetSpecificPath += Target.Architecture + "/";
                break;

            case UnrealTargetPlatform.Android:
                PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib");
                break;
            }

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

            // Library Paths
            EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix;
                    if (Target.Platform == UnrealTargetPlatform.Android)
                    {
                        // we will filter out in the toolchain
                        PublicAdditionalLibraries.Add(LibraryName);                                 // Android requires only the filename.
                    }
                    else
                    {
                        PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension);     // Linux seems to need the path, not just the filename.
                    }
                }
                break;

            case EICULinkType.Dynamic:
                if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    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 = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

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

                        // add runtime dependencies (for staging)
                        RuntimeDependencies.Add(new RuntimeDependency(PathToBinary + "lib" + LibraryName + ".so"));
                        RuntimeDependencies.Add(new RuntimeDependency(PathToBinary + "lib" + LibraryName + ".so.53"));      // version-dependent
                    }
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS)
        {
            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 && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.IOS || Target.IsMonolithic) ? 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);
                    if (Target.Platform == UnrealTargetPlatform.IOS)
                    {
                        PublicAdditionalShadowFiles.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 = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName;

                        PublicDelayLoadDLLs.Add(LibraryPath);
                        PublicAdditionalShadowFiles.Add(LibraryPath);
                    }
                    else if (Target.Platform == UnrealTargetPlatform.Linux)
                    {
                        string LibraryName = "icu" + Stem + LibraryNamePostfix;
                        string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

                        PublicLibraryPaths.Add(LibraryPath);
                        PublicAdditionalLibraries.Add(LibraryName);
                    }
                }
                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
            };

            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = "libicu" + Stem + "." + 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.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 && BuildConfiguration.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
        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.Linux) ||
            (Target.Platform == UnrealTargetPlatform.Android) ||
            (Target.Platform == UnrealTargetPlatform.Mac) ||
            (Target.Platform == UnrealTargetPlatform.IOS) ||
            (Target.Platform == UnrealTargetPlatform.PS4) ||
            (Target.Platform == UnrealTargetPlatform.XboxOne) ||
            (Target.Platform == UnrealTargetPlatform.HTML5))
        {
            // Definitions
            Definitions.Add("U_USING_ICU_NAMESPACE=0");              // Disables a using declaration for namespace "icu".
            Definitions.Add("U_STATIC_IMPLEMENTATION");              // Necessary for linking to ICU statically.
            Definitions.Add("U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1");   // Disables unnecessary inclusion of headers - inclusions are for ease of use.
            Definitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit");   // Makes UnicodeString constructors for ICU character types explicit.
            Definitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit.
            Definitions.Add("UCONFIG_NO_TRANSLITERATION=1");         // Disables declarations and compilation of unused ICU transliteration functionality.
        }

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

        if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Definitions
            Definitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            Definitions.Add("U_PLATFORM=U_PF_DURANGO");
        }
    }
    public PhysX(TargetInfo Target)
    {
        Type = ModuleType.External;

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

        // Quick Mac hack
        if (Target.Platform == UnrealTargetPlatform.Mac && (LibraryMode == PhysXLibraryMode.Checked || LibraryMode == PhysXLibraryMode.Shipping))
        {
            LibraryMode = PhysXLibraryMode.Profile;
        }
        string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode);

        Definitions.Add("WITH_PHYSX=1");
        if (UEBuildConfiguration.bCompileAPEX == false)
        {
            // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly.
            // This will properly cover the case where PhysX is compiled but APEX is not.
            Definitions.Add("WITH_APEX=0");
        }
        if (UEBuildConfiguration.bCompilePhysXVehicle == false)
        {
            // Since PhysX Vehicle is dependent on PhysX, if Vehicle is not being include, set the flag properly.
            // This will properly cover the case where PhysX is compiled but Vehicle is not.
            Definitions.Add("WITH_VEHICLE=0");
        }

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

        if (LibraryMode == PhysXLibraryMode.Checked)
        {
            Definitions.Add("WITH_PHYSX_CHECKED=1");
        }
        else
        {
            Definitions.Add("WITH_PHYSX_CHECKED=0");
        }


        string PhysXVersion = "PhysX-3.3";

        string PhysXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/";

        string PhysXLibDir = PhysXDir + "lib/";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            PhysXDir + "include",
            PhysXDir + "include/foundation",
            PhysXDir + "include/cooking",
            PhysXDir + "include/common",
            PhysXDir + "include/extensions",
            PhysXDir + "include/geometry",
            PhysXDir + "include/vehicle"
        }
            );

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/windows");

            PhysXLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesX64 = new string[] {
                "PhysX3{0}_x64.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}_x64.lib",
                "PhysX3Common{0}_x64.lib",
                "PhysX3Vehicle{0}.lib",
                "PxTask{0}.lib",
                "PhysXVisualDebuggerSDK{0}.lib",
                "PhysXProfileSDK{0}.lib"
            };

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

            string[] RuntimeDependenciesX64 = new string[] {
                "PhysX3{0}_x64.dll",
                "PhysX3Common{0}_x64.dll",
                "PhysX3Cooking{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));
            }
            PublicDelayLoadDLLs.Add("nvToolsExt64_1.dll");

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win64/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in RuntimeDependenciesX64)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }
            RuntimeDependencies.Add(PhysXBinariesDir + "nvToolsExt64_1.dll", StagedFileType.NonUFS);
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            PublicIncludePaths.Add(PhysXDir + "include/foundation/windows");

            PhysXLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesX86 = new string[] {
                "PhysX3{0}_x86.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}_x86.lib",
                "PhysX3Common{0}_x86.lib",
                "PhysX3Vehicle{0}.lib",
                "PxTask{0}.lib",
                "PhysXVisualDebuggerSDK{0}.lib",
                "PhysXProfileSDK{0}.lib"
            };

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

            string[] RuntimeDependenciesX86 = new string[] {
                "PhysX3{0}_x86.dll",
                "PhysX3Common{0}_x86.dll",
                "PhysX3Cooking{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));
            }
            PublicDelayLoadDLLs.Add("nvToolsExt32_1.dll");

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win32/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in RuntimeDependenciesX86)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }
            RuntimeDependencies.Add(PhysXBinariesDir + "nvToolsExt32_1.dll", StagedFileType.NonUFS);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");

            PhysXLibDir += "/osx64";
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesMac = new string[] {
                PhysXLibDir + "/libLowLevel{0}.a",
                PhysXLibDir + "/libLowLevelCloth{0}.a",
                PhysXLibDir + "/libPhysX3{0}.a",
                PhysXLibDir + "/libPhysX3Extensions{0}.a",
                PhysXLibDir + "/libPhysX3Cooking{0}.a",
                PhysXLibDir + "/libPhysX3Common{0}.a",
                PhysXLibDir + "/libPhysX3Vehicle{0}.a",
                PhysXLibDir + "/libPxTask{0}.a",
                PhysXLibDir + "/libPhysXVisualDebuggerSDK{0}.a",
                PhysXLibDir + "/libPhysXProfileSDK{0}.a",
                PhysXLibDir + "/libPvdRuntime{0}.a",
                PhysXLibDir + "/libSceneQuery{0}.a",
                PhysXLibDir + "/libSimulationController{0}.a"
            };

            foreach (string Lib in StaticLibrariesMac)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x86");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/arm64");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x64");

            string[] StaticLibrariesAndroid = new string[] {
                "LowLevel{0}",
                "LowLevelCloth{0}",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                // "PhysX3Cooking{0}", // not needed until Apex
                "PhysX3Common{0}",
                "PhysX3Vehicle{0}",
                "PxTask{0}",
                "PhysXVisualDebuggerSDK{0}",
                "PhysXProfileSDK{0}",
                "PvdRuntime{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
            };

            // shipping libs do not need this
            if (LibraryMode != PhysXLibraryMode.Shipping)
            {
                // use for profiling, but crash handler won't work
//				PublicAdditionalLibraries.Add("nvToolsExt");

                // disables profiling, crash handler will work
                PublicAdditionalLibraries.Add("nvToolsExtStub");
            }

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

            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesLinux = new string[] {
                "rt",
                "LowLevel{0}",
                "LowLevelCloth{0}",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "PhysX3Vehicle{0}",
                "PxTask{0}",
                "PhysXVisualDebuggerSDK{0}",
                "PhysXProfileSDK{0}",
                "PvdRuntime{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
            };

            if (LibraryMode == PhysXLibraryMode.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                //@TODO: Needed?
                PublicAdditionalLibraries.Add("m");
            }

            foreach (string Lib in StaticLibrariesLinux)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");

            PhysXLibDir = Path.Combine(PhysXLibDir, Target.Platform.ToString());
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelCloth",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "PhysX3Vehicle",
                "PxTask",
                "PhysXVisualDebuggerSDK",
                "PhysXProfileSDK",
                "PvdRuntime",
                "SceneQuery",
                "SimulationController",
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
                PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");

            PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/");

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelCloth",
                "PhysX3",
                "PhysX3Common",
                "PhysX3Cooking",
                "PhysX3Extensions",
                "PxTask",
                "PhysXVisualDebuggerSDK",
                "PhysXProfileSDK",
                "PvdRuntime",
                "SceneQuery",
                "SimulationController",
            };

            foreach (var lib in PhysXLibs)
            {
                if (!lib.Contains("Cooking") || Target.IsCooked == false)
                {
                    PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc");
                }
            }

            if (UEBuildConfiguration.bCompilePhysXVehicle)
            {
                string[] PhysXVehicleLibs = new string[]
                {
                    "PhysX3Vehicle",
                };

                foreach (var lib in PhysXVehicleLibs)
                {
                    if (!lib.Contains("Cooking") || Target.IsCooked == false)
                    {
                        PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc");
                    }
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/PS4");
            PublicLibraryPaths.Add(PhysXDir + "lib/PS4");

            string[] StaticLibrariesPS4 = new string[] {
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "PhysX3Vehicle{0}",
                "PxTask{0}",
                "PhysXVisualDebuggerSDK{0}",
                "PhysXProfileSDK{0}"
            };

            foreach (string Lib in StaticLibrariesPS4)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        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);
                PublicSystemIncludePaths.Add("include/foundation/xboxone");
                PublicLibraryPaths.Add(PhysXDir + "Lib/XboxOne/VS" + VersionName.ToString());

                string[] StaticLibrariesXB1 = new string[] {
                    "PhysX3{0}.lib",
                    "PhysX3Extensions{0}.lib",
                    "PhysX3Cooking{0}.lib",
                    "PhysX3Common{0}.lib",
                    "PhysX3Vehicle{0}.lib",
                    "PxTask{0}.lib",
                    "PhysXVisualDebuggerSDK{0}.lib",
                    "PhysXProfileSDK{0}.lib"
                };

                foreach (string Lib in StaticLibrariesXB1)
                {
                    PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
                }
            }
        }
    }
    public Python(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        var EngineDir    = Path.GetFullPath(Target.RelativeEnginePath);
        var PythonTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python");

        string PythonRoot        = null;
        string PythonIncludePath = null;
        string PythonLibPath     = null;
        string PythonLibName     = null;

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)
        {
            // Check for an explicit version before using the auto-detection logic
            PythonRoot = System.Environment.GetEnvironmentVariable("UE_PYTHON_DIR");
        }

        // Perform auto-detection to try and find the Python root
        if (PythonRoot == null)
        {
            var KnownPaths = new List <string>();

            // todo: This isn't correct for cross-compilation, we need to consider the host platform too
            if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
            {
                KnownPaths.AddRange(
                    new string[] {
                    Path.Combine(PythonTPSDir, Target.Platform == UnrealTargetPlatform.Win32 ? "Win32" : "Win64"),
                    //"C:/Program Files/Python36",
                    "C:/Python27",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                KnownPaths.AddRange(
                    new string[] {
                    Path.Combine(PythonTPSDir, "Mac"),
                    //"/Library/Frameworks/Python.framework/Versions/3.6",
                    "/Library/Frameworks/Python.framework/Versions/2.7",
                    //"/System/Library/Frameworks/Python.framework/Versions/2.7",
                }
                    );
            }

            foreach (var KnownPath in KnownPaths)
            {
                if (Directory.Exists(KnownPath))
                {
                    PythonRoot = KnownPath;
                    break;
                }
            }
        }

        // Work out the include path
        if (PythonRoot != null)
        {
            PythonIncludePath = Path.Combine(PythonRoot, "include");
            if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                // On Mac the actual headers are inside a "pythonxy" directory, where x and y are the version number
                if (Directory.Exists(PythonIncludePath))
                {
                    string[] MatchingIncludePaths = Directory.GetDirectories(PythonIncludePath, "python*");
                    if (MatchingIncludePaths.Length > 0)
                    {
                        PythonIncludePath = Path.Combine(PythonIncludePath, Path.GetFileName(MatchingIncludePaths[0]));
                    }
                }
            }
            if (!Directory.Exists(PythonIncludePath))
            {
                PythonRoot = null;
            }
        }

        // Work out the lib path
        if (PythonRoot != null)
        {
            string LibFolder      = null;
            string LibNamePattern = null;
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win32:
            case UnrealTargetPlatform.Win64:
                LibFolder      = "libs";
                LibNamePattern = "python*.lib";
                break;

            case UnrealTargetPlatform.Mac:
                LibFolder      = "lib";
                LibNamePattern = "libpython*.dylib";
                break;

            case UnrealTargetPlatform.Linux:
                LibFolder      = "lib";
                LibNamePattern = "libpython*.so";
                break;

            default:
                break;
            }

            if (LibFolder != null && LibNamePattern != null)
            {
                PythonLibPath = Path.Combine(PythonRoot, LibFolder);

                if (Directory.Exists(PythonLibPath))
                {
                    string[] MatchingLibFiles = Directory.GetFiles(PythonLibPath, LibNamePattern);
                    if (MatchingLibFiles.Length > 0)
                    {
                        PythonLibName = Path.GetFileName(MatchingLibFiles[0]);
                    }
                }
            }

            if (PythonLibPath == null || PythonLibName == null)
            {
                PythonRoot = null;
            }
        }

        // Make sure the Python install is the correct architecture
        if (PythonRoot != null)
        {
            string ExpectedPointerSizeResult = Target.Platform == UnrealTargetPlatform.Win32 ? "4" : "8";

            // Invoke Python to query the pointer size of the interpreter so we can work out whether it's 32-bit or 64-bit
            // todo: We probably need to do this for all platforms, but right now it's only an issue on Windows
            if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
            {
                string Result = InvokePython(PythonRoot, "-c \"import struct; print(struct.calcsize('P'))\"");
                Result = Result != null?Result.Replace("\r", "").Replace("\n", "") : null;

                if (Result == null || Result != ExpectedPointerSizeResult)
                {
                    PythonRoot = null;
                }
            }
        }

        if (PythonRoot == null)
        {
            PublicDefinitions.Add("WITH_PYTHON=0");
        }
        else
        {
            // If the Python install we're using is within the Engine directory, make the path relative so that it's portable
            string EngineRelativePythonRoot = PythonRoot;
            if (EngineRelativePythonRoot.StartsWith(EngineDir))
            {
                // Strip the Engine directory and then combine the path with the placeholder to ensure the path is delimited correctly
                EngineRelativePythonRoot = EngineRelativePythonRoot.Remove(0, EngineDir.Length);
                RuntimeDependencies.Add(Path.Combine("$(EngineDir)", EngineRelativePythonRoot, "..."));            // Stage the Python SDK for use at runtime
                EngineRelativePythonRoot = Path.Combine("{ENGINE_DIR}", EngineRelativePythonRoot);                 // Can't use $(EngineDir) as the placeholder here as UBT is eating it
            }

            PublicDefinitions.Add("WITH_PYTHON=1");
            PublicDefinitions.Add(string.Format("UE_PYTHON_DIR=\"{0}\"", EngineRelativePythonRoot.Replace('\\', '/')));

            // Some versions of Python need this define set when building on MSVC
            if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicDefinitions.Add("HAVE_ROUND=1");
            }

            PublicSystemIncludePaths.Add(PythonIncludePath);
            if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                // Mac doesn't understand PublicLibraryPaths
                PublicAdditionalLibraries.Add(Path.Combine(PythonLibPath, PythonLibName));
            }
            else
            {
                PublicLibraryPaths.Add(PythonLibPath);
                PublicAdditionalLibraries.Add(PythonLibName);
            }
        }
    }
Exemplo n.º 9
0
    public Engine(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/EnginePrivatePCH.h";

        SharedPCHHeaderFile = "Public/EngineSharedPCH.h";

        PublicIncludePathModuleNames.AddRange(new string[] { "Renderer", "PacketHandler", "NetworkReplayStreaming", "AudioMixer", "AnimationCore" });

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

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "TargetPlatform",
            "ImageWrapper",
            "ImageWriteQueue",
            "HeadMountedDisplay",
            "EyeTracker",
            "MRMesh",
            "Advertising",
            "NetworkReplayStreaming",
            "MovieSceneCapture",
            "AutomationWorker",
            "MovieSceneCapture",
            "DesktopPlatform",
        }
            );

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

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "SlateReflector",
            }
                );

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

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "ApplicationCore",
            "Json",
            "SlateCore",
            "Slate",
            "InputCore",
            "Messaging",
            "MessagingCommon",
            "RenderCore",
            "RHI",
            "ShaderCore",
            "Sockets",
            "UtilityShaders",
            "AssetRegistry",                     // Here until FAssetData is moved to engine
            "EngineMessages",
            "EngineSettings",
            "SynthBenchmark",
            "GameplayTags",
            "DatabaseSupport",
            "PacketHandler",
            "AudioPlatformConfiguration",
            "MeshDescription",
            "PakFile",
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "AppFramework",
            "Networking",
            "Landscape",
            "UMG",
            "Projects",
            "MaterialShaderQualitySettings",
            "CinematicCamera",
            "Analytics",
            "AnalyticsET",
            //"CrunchCompression"
        }
            );

        DynamicallyLoadedModuleNames.Add("EyeTracker");


        if (Target.bUseXGEController &&
            Target.Type == TargetType.Editor &&
            (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32))
        {
            PrivateDependencyModuleNames.Add("XGEController");
        }

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.Add("Localization");
            DynamicallyLoadedModuleNames.Add("Localization");
        }

        // to prevent "causes WARNING: Non-editor build cannot depend on non-redistributable modules."
        if (Target.Type == TargetType.Editor)
        {
            // for now we depend on this
            PrivateDependencyModuleNames.Add("RawMesh");
            PrivateDependencyModuleNames.Add("MeshDescriptionOperations");
        }

        bool bVariadicTemplatesSupported = true;

        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);
                if (VersionName.ToString().Equals("2012"))
                {
                    bVariadicTemplatesSupported = false;
                }
            }

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "libOpus"
                                                         );
        }

        if (bVariadicTemplatesSupported)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "MessagingRpc",
                "PortalRpc",
                "PortalServices",
            }
                );

            if (Target.Type == TargetType.Editor)
            {
                // these modules require variadic templates
                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "MessagingRpc",
                    "PortalRpc",
                    "PortalServices",
                }
                    );
            }
        }

        CircularlyReferencedDependentModules.Add("GameplayTags");
        CircularlyReferencedDependentModules.Add("Landscape");
        CircularlyReferencedDependentModules.Add("UMG");
        CircularlyReferencedDependentModules.Add("MaterialShaderQualitySettings");
        CircularlyReferencedDependentModules.Add("CinematicCamera");

        // The AnimGraphRuntime module is not needed by Engine proper, but it is loaded in LaunchEngineLoop.cpp,
        // and needs to be listed in an always-included module in order to be compiled into standalone games
        DynamicallyLoadedModuleNames.Add("AnimGraphRuntime");

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "MovieScene",
            "MovieSceneCapture",
            "MovieSceneTracks",
            "HeadMountedDisplay",
            "MRMesh",
            "StreamingPauseRendering",
        }
            );

        if (Target.Type != TargetType.Server)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "Media",
                "SlateNullRenderer",
                "SlateRHIRenderer"
            }
                );

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

        if (Target.Type == TargetType.Server || Target.Type == TargetType.Editor)
        {
            PrivateDependencyModuleNames.Add("PerfCounters");
        }

        if (Target.bBuildDeveloperTools)
        {
            // Add "BlankModule" so that it gets compiled as an example and will be maintained and tested.  This can be removed
            // at any time if needed.  The module isn't actually loaded by the engine so there is no runtime cost.
            DynamicallyLoadedModuleNames.Add("BlankModule");

            if (Target.Type != TargetType.Server)
            {
                PrivateIncludePathModuleNames.Add("MeshUtilities");
                PrivateIncludePathModuleNames.Add("MeshUtilitiesCommon");

                DynamicallyLoadedModuleNames.Add("MeshUtilities");

                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "ImageCore",
                    "RawMesh"
                }
                    );
            }

            if (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test && Target.Type != TargetType.Server)
            {
                PrivateDependencyModuleNames.Add("CollisionAnalyzer");
                CircularlyReferencedDependentModules.Add("CollisionAnalyzer");

                PrivateDependencyModuleNames.Add("LogVisualizer");
                CircularlyReferencedDependentModules.Add("LogVisualizer");
            }

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "WindowsTargetPlatform",
                    "WindowsNoEditorTargetPlatform",
                    "WindowsServerTargetPlatform",
                    "WindowsClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                    "WindowsPlatformEditor",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "MacTargetPlatform",
                    "MacNoEditorTargetPlatform",
                    "MacServerTargetPlatform",
                    "MacClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                    "MacPlatformEditor",
                }
                    );
            }
            else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "LinuxTargetPlatform",
                    "LinuxNoEditorTargetPlatform",
                    "LinuxServerTargetPlatform",
                    "LinuxClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                    "LinuxPlatformEditor",
                }
                    );
            }
        }

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
            "NetworkReplayStreaming",
            "NullNetworkReplayStreaming",
            "HttpNetworkReplayStreaming",
            "Advertising"
        }
            );

        if (Target.Type != TargetType.Server)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "ImageWrapper"
            }
                );
        }

        WhitelistRestrictedFolders.Add("Private/NotForLicensees");

        if (!Target.bBuildRequiresCookedData && Target.bCompileAgainstEngine)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "DerivedDataCache",
                "TargetPlatform",
                "DesktopPlatform"
            }
                );
        }

        if (Target.bBuildEditor == true)
        {
            PublicDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                );              // @todo api: Only public because of WITH_EDITOR and UNREALED_API

            CircularlyReferencedDependentModules.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                );

            PrivateIncludePathModuleNames.Add("TextureCompressor");
            PrivateIncludePaths.Add("Developer/TextureCompressor/Public");

            PrivateIncludePathModuleNames.Add("HierarchicalLODUtilities");
            DynamicallyLoadedModuleNames.Add("HierarchicalLODUtilities");

            DynamicallyLoadedModuleNames.Add("AnimationModifiers");

            PrivateIncludePathModuleNames.Add("AssetTools");
            DynamicallyLoadedModuleNames.Add("AssetTools");

            PrivateIncludePathModuleNames.Add("PIEPreviewDeviceProfileSelector");
        }

        SetupModulePhysicsSupport(Target);

        if (Target.bCompilePhysX && (Target.bBuildEditor || Target.bCompileAPEX))
        {
            DynamicallyLoadedModuleNames.Add("PhysXCooking");
        }

        // Engine public headers need to know about some types (enums etc.)
        PublicIncludePathModuleNames.Add("ClothingSystemRuntimeInterface");
        PublicDependencyModuleNames.Add("ClothingSystemRuntimeInterface");

        if (Target.bBuildEditor)
        {
            PrivateDependencyModuleNames.Add("ClothingSystemEditorInterface");
            PrivateIncludePathModuleNames.Add("ClothingSystemEditorInterface");
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "libOpus"
                                                         );

            // Head Mounted Display support
//			PrivateIncludePathModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
//			DynamicallyLoadedModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
        }

        if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            // TODO test this for HTML5 !
            //AddEngineThirdPartyPrivateStaticDependencies(Target,
            //		"UEOgg",
            //		"Vorbis",
            //		"VorbisFile"
            //		);
            PublicDependencyModuleNames.Add("HTML5JS");
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "libOpus"
                                                         );
            PublicFrameworks.AddRange(new string[] { "AVFoundation", "CoreVideo", "CoreMedia" });
        }

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile"
                                                         );

            PrivateDependencyModuleNames.Add("AndroidRuntimeSettings");
        }

        if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PrivateDependencyModuleNames.Add("IOSRuntimeSettings");
        }

        if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            PrivateDependencyModuleNames.Add("SwitchRuntimeSettings");
        }

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "libOpus"
                                                         );
        }

        PublicDefinitions.Add("GPUPARTICLE_LOCAL_VF_ONLY=0");

        // Add a reference to the stats HTML files referenced by UEngine::DumpFPSChartToHTML. Previously staged by CopyBuildToStagingDirectory.
        if (Target.bBuildEditor || Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            RuntimeDependencies.Add("$(EngineDir)/Content/Stats/...", StagedFileType.UFS);
        }
    }
Exemplo n.º 10
0
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bFasterWithoutUnity = 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"));
            PublicLibraryPaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/armeabi-v7a"));
            PublicAdditionalLibraries.Add("python3.5m");

            string APLName    = "UnrealEnginePython_APL.xml";
            string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(ModuleDirectory, APLName), Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", RelAPLPath);
        }
#endif
    }
Exemplo n.º 11
0
    public PhysX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

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

        string EngineBinThirdPartyPath = Path.Combine("$(EngineDir)", "Binaries", "ThirdParty", "PhysX3");

        // Libraries and DLLs for windows platform
        if (Target.Platform.IsInGroup(UnrealPlatformGroup.Windows) && Target.Platform != UnrealTargetPlatform.Win32)
        {
            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(Path.Combine(PhysXLibDir, "Win64", "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(), String.Format(Lib, LibrarySuffix)));
            }

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

            string PhysXBinariesDir = Path.Combine(EngineBinThirdPartyPath, "Win64", "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX64)
            {
                string FileName = Path.Combine(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);
            }

            foreach (string DLL in PxSharedRuntimeDependenciesX64)
            {
                RuntimeDependencies.Add(Path.Combine(PhysXBinariesDir, String.Format(DLL, LibrarySuffix)));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            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(Path.Combine(PhysXLibDir, "Win32", "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(), String.Format(Lib, LibrarySuffix)));
            }

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

            string PhysXBinariesDir = Path.Combine(EngineBinThirdPartyPath, "Win32", "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX86)
            {
                string FileName = Path.Combine(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.HoloLens)
        {
            string Arch = Target.WindowsPlatform.GetArchitectureSubpath();

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

            string[] DelayLoadDLLs = new string[] {
                "PxFoundation{0}_{1}.dll",
                "PxPvdSDK{0}_{1}.dll",
                "PhysX3{0}_{1}.dll",
                "PhysX3Cooking{0}_{1}.dll",
                "PhysX3Common{0}_{1}.dll",
            };

            string[] PxSharedRuntimeDependencies = new string[] {
                "PxFoundation{0}_{1}.dll",
                "PxPvdSDK{0}_{1}.dll",
            };

            foreach (string Lib in StaticLibraries)
            {
                PublicAdditionalLibraries.Add(Path.Combine(PhysXLibDir, Target.Platform.ToString(), "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(), String.Format(Lib, LibrarySuffix, Arch)));
            }

            foreach (string DLL in DelayLoadDLLs)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix, Arch));
            }
            string PhysXBinariesDir = Path.Combine(EngineBinThirdPartyPath, Target.Platform.ToString(), "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLs)
            {
                string FileName = Path.Combine(PhysXBinariesDir, String.Format(DLL, LibrarySuffix, Arch));
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

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

            foreach (string DLL in PxSharedRuntimeDependencies)
            {
                RuntimeDependencies.Add(Path.Combine(PhysXBinariesDir, String.Format(DLL, LibrarySuffix, Arch)));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string[] StaticLibrariesMac = new string[] {
                Path.Combine(PhysXLibDir, "Mac", "libLowLevel{0}.a"),
                Path.Combine(PhysXLibDir, "Mac", "libLowLevelCloth{0}.a"),
                Path.Combine(PhysXLibDir, "Mac", "libPhysX3Extensions{0}.a"),
                Path.Combine(PhysXLibDir, "Mac", "libSceneQuery{0}.a"),
                Path.Combine(PhysXLibDir, "Mac", "libSimulationController{0}.a"),
                Path.Combine(PxSharedLibDir, "Mac", "libPxTask{0}.a"),
                Path.Combine(PxSharedLibDir, "Mac", "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 = Path.Combine(Target.UEThirdPartyBinariesDirectory, "PhysX3", "Mac");
            foreach (string Lib in DynamicLibrariesMac)
            {
                string LibraryPath = Path.Combine(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))
        {
            string[] Architectures = new string[] {
                "ARMv7",
                "ARM64",
                "x86",
                "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 Architecture in Architectures)
            {
                foreach (string Lib in StaticLibrariesAndroid)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(PhysXLibDir, "Android", Architecture, "lib" + String.Format(Lib, LibrarySuffix) + ".a"));
                }
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            PublicSystemLibraries.Add("rt");

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

            foreach (string Lib in StaticLibrariesPhysXLinux)
            {
                PublicAdditionalLibraries.Add(Path.Combine(PhysXLibDir, "Linux", Target.Architecture, "lib" + String.Format(Lib, LibrarySuffix) + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            string[] PhysXLibs = new string[]
            {
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "PhysX3{0}",
                "PhysX3Common{0}",
                // "PhysX3Cooking{0}", // not needed until Apex
                "PhysX3Extensions{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(Path.Combine(PhysXLibDir, "IOS", "lib" + String.Format(PhysXLib, LibrarySuffix) + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.TVOS)
        {
            string[] PhysXLibs = new string[]
            {
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "PhysX3{0}",
                "PhysX3Common{0}",
                // "PhysX3Cooking{0}", // not needed until Apex
                "PhysX3Extensions{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(Path.Combine(PhysXLibDir, "TVOS", "lib" + String.Format(PhysXLib, LibrarySuffix) + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            PublicDefinitions.Add("PX_PHYSX_STATIC_LIB=1");
            PublicDefinitions.Add("_XBOX_ONE=1");

            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(Path.Combine(PhysXLibDir, "XboxOne", "VS2015", String.Format(Lib, LibrarySuffix)));
            }
        }
    }
Exemplo n.º 12
0
        public FliteTTSPlugin(ReadOnlyTargetRules Target) : base(Target)
        {
            bEnableUndefinedIdentifierWarnings = false;
            PublicIncludePaths.AddRange(
                new string[] {
                "FliteTTSPlugin/Private",
                "FliteTTSPlugin/Public",
                "FliteTTSPlugin/ThirdParty/flite/include",    // ... add public include paths required here ...
            }
                );

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

            PublicDependencyModuleNames.AddRange(
                new string[]
                { "Core",
                  "CoreUObject",
                  "Engine",
                  "InputCore",
                  // ... 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 ...
            }
                );


            if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                string FliteDirectory = Path.Combine(BaseDirectory, "ThirdParty", "flite", "lib");
                RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(FliteDirectory, "fliteDll.dll")));
                RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(FliteDirectory, "cmu_us_rms.dll")));
                // RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(FliteDirectory, "cmu_us_slt.dll")));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "flite.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "libflite-cmulex.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "libflite-usenglish.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "cmu_us_rms.lib"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                string FliteDirectory = Path.Combine(BaseDirectory, "ThirdParty", "flite", "lib");
                RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(FliteDirectory, "fliteDll.dll")));
                RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(FliteDirectory, "cmu_us_rms.dll")));
                // RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(FliteDirectory, "cmu_us_slt.dll")));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "flite.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "libflite-cmulex.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "libflite-usenglish.lib"));;
                PublicAdditionalLibraries.Add(Path.Combine(FliteDirectory, "cmu_us_rms.lib"));
            }
            else
            {
                // Linux, Mac, WinRT: not supported
            }
        }
    public AWSCore(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateIncludePaths.AddRange(new string[] { "GameLiftClientSDK/AWSCore/Private" });
        PublicIncludePaths.AddRange(new string[] { "GameLiftClientSDK/AWSCore/Public" });

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

        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)
        {
            PublicLibraryPaths.Add(ThirdPartyPath);

            //string AWSCCommonLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.lib");
            //if (File.Exists(AWSCCommonLibFile))
            //{
            //    PublicAdditionalLibraries.Add(AWSCCommonLibFile);
            //}
            //else
            //{
            //    throw new BuildException("aws-c-common.lib not found. Expected in this location: " + AWSCCommonLibFile);
            //}

            //string AWSCCommonDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.dll");
            //if (File.Exists(AWSCCommonDLLFile))
            //{
            //    PublicAdditionalLibraries.Add(AWSCCommonDLLFile);
            //}
            //else
            //{
            //    throw new BuildException("aws-c-common.dll not found. Expected in this location: " + AWSCCommonDLLFile);
            //}

            //string AWSCEventStreamLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.lib");
            //if (File.Exists(AWSCEventStreamLibFile))
            //{
            //    PublicAdditionalLibraries.Add(AWSCEventStreamLibFile);
            //}
            //else
            //{
            //    throw new BuildException("aws-c-event-stream.lib not found. Expected in this location: " + AWSCEventStreamLibFile);
            //}

            //string AWSCEventStreamDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.dll");
            //if (File.Exists(AWSCEventStreamDLLFile))
            //{
            //    PublicAdditionalLibraries.Add(AWSCEventStreamDLLFile);
            //}
            //else
            //{
            //    throw new BuildException("aws-c-event-stream.dll not found. Expected in this location: " + AWSCEventStreamDLLFile);
            //}

            string AWSCoreLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-core.lib");
            if (File.Exists(AWSCoreLibFile))
            {
                PublicAdditionalLibraries.Add(AWSCoreLibFile);
            }
            else
            {
                throw new BuildException("aws-cpp-sdk-core.lib not found. Expected in this location: " + AWSCoreLibFile);
            }

            string AWSCoreDLLFile     = System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-core.dll");
            string AWSCommonDLLFile   = System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.dll");
            string AWSStreamDLLFile   = System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.dll");
            string AWSChecksumDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-checksums.dll");

            if (File.Exists(AWSCoreDLLFile))
            {
                RuntimeDependencies.Add(AWSCommonDLLFile);
                RuntimeDependencies.Add(AWSStreamDLLFile);
                RuntimeDependencies.Add(AWSChecksumDLLFile);

                PublicDelayLoadDLLs.Add("aws-cpp-sdk-core.dll");
                RuntimeDependencies.Add(AWSCoreDLLFile);
            }
            else
            {
                throw new BuildException("aws-cpp-sdk-core.dll not found. Expected in this location: " + AWSCoreDLLFile);
            }

            string BinariesDirectory = System.IO.Path.Combine(BaseDirectory, "Binaries", Target.Platform.ToString());
            if (!Directory.Exists(BinariesDirectory))
            {
                Directory.CreateDirectory(BinariesDirectory);
            }

            if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-cpp-sdk-core.dll")) == false)
            {
                File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-core.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-cpp-sdk-core.dll"));
            }

            if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-c-common.dll")) == false)
            {
                File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-c-common.dll"));
            }

            if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-c-event-stream.dll")) == false)
            {
                File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-c-event-stream.dll"));
            }

            if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-checksums.dll")) == false)
            {
                File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-checksums.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-checksums.dll"));
            }
        }
    }
Exemplo n.º 14
0
    public Steamworks(TargetInfo Target)
    {
        /** Mark the current version of the Steam SDK */
        string SteamVersion = "v132";

        Type = ModuleType.External;

        string SdkBase = UEBuildConfiguration.UEThirdPartySourceDirectory + "Steamworks/Steam" + SteamVersion + "/sdk";

        if (!Directory.Exists(SdkBase))
        {
            string Err = string.Format("steamworks SDK not found in {0}", SdkBase);
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }

        PublicIncludePaths.Add(SdkBase + "/public");

        string LibraryPath = SdkBase + "/redistributable_bin/";
        string LibraryName = "steam_api";

        if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(LibraryPath);
            PublicAdditionalLibraries.Add(LibraryName + ".lib");
            PublicDelayLoadDLLs.Add(LibraryName + ".dll");

            string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win32/", SteamVersion);
            RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steam_api.dll"));

            if (Target.Type == TargetRules.TargetType.Server)
            {
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steamclient.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "tier0_s.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "vstdlib_s.dll"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(LibraryPath + "win64");
            PublicAdditionalLibraries.Add(LibraryName + "64.lib");
            PublicDelayLoadDLLs.Add(LibraryName + "64.dll");

            string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win64/", SteamVersion);
            RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + LibraryName + "64.dll"));

            if (Target.Type == TargetRules.TargetType.Server)
            {
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steamclient64.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "tier0_s64.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "vstdlib_s64.dll"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibraryPath += "osx32/libsteam_api.dylib";
            PublicDelayLoadDLLs.Add(LibraryPath);
            PublicAdditionalShadowFiles.Add(LibraryPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.IsMonolithic)
            {
                LibraryPath += "linux64";
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add(LibraryName);
            }
            else
            {
                LibraryPath += "linux64/libsteam_api.so";
                PublicDelayLoadDLLs.Add(LibraryPath);
            }
        }
    }
Exemplo n.º 15
0
        public HiveMPSDK(ReadOnlyTargetRules Target) : base(Target)
        {
            PublicDefinitions.Add("HIVEMPSDK_PACKAGE=1");
            PublicDefinitions.Add("CLIENT_CONNECT_TARGETING_UNREAL=1");
            PublicDefinitions.Add("HAVE_LIBINTL_H=0");
            PublicDefinitions.Add("HAVE_STRING_H=0");
            PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

            PublicDependencyModuleNames.AddRange(
                new string[] {
                "Core",
                "CoreUObject",
                "Engine",
                "Sockets",
                "OnlineSubsystem",
                "OnlineSubsystemUtils",
                "Json",
                "Http",
                "PacketHandler",
                "WebSocket"
            }
                );

            string SdkBase = Path.GetFullPath(Path.Combine(ModuleDirectory, "Private/steam"));

            PrivateIncludePaths.Add(Path.Combine(SdkBase, "public"));

            string LibraryPath = SdkBase;
            string LibraryName = "steam_api";

            if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicDefinitions.Add("STEAMSDK_FOUND=1");
                PublicDefinitions.Add("WITH_STEAMWORKS=1");
                PublicLibraryPaths.Add(Path.Combine(LibraryPath, "win32"));
                PublicAdditionalLibraries.Add(LibraryName + ".lib");
                PublicDelayLoadDLLs.Add(LibraryName + ".dll");
                RuntimeDependencies.Add(Path.Combine(LibraryPath, "win32/" + LibraryName + ".dll"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicDefinitions.Add("STEAMSDK_FOUND=1");
                PublicDefinitions.Add("WITH_STEAMWORKS=1");
                PublicLibraryPaths.Add(Path.Combine(LibraryPath, "win64"));
                PublicAdditionalLibraries.Add(LibraryName + "64.lib");
                PublicDelayLoadDLLs.Add(LibraryName + "64.dll");
                RuntimeDependencies.Add(Path.Combine(LibraryPath, "win64/" + LibraryName + "64.dll"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicDefinitions.Add("STEAMSDK_FOUND=1");
                PublicDefinitions.Add("WITH_STEAMWORKS=1");
                PublicDelayLoadDLLs.Add(Path.Combine(LibraryPath, "osx/lib" + LibraryName + ".dylib"));
                PublicAdditionalShadowFiles.Add(LibraryPath);
                AdditionalBundleResources.Add(new UEBuildBundleResource(LibraryPath, "MacOS"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                PublicDefinitions.Add("STEAMSDK_FOUND=1");
                PublicDefinitions.Add("WITH_STEAMWORKS=1");

                if (Target.LinkType == TargetLinkType.Monolithic)
                {
                    PublicLibraryPaths.Add(Path.Combine(LibraryPath, "linux64"));
                    PublicAdditionalLibraries.Add(LibraryName);
                }
                else
                {
                    PublicDelayLoadDLLs.Add(Path.Combine(LibraryPath, "linux64/lib" + LibraryName + ".so"));
                }
                PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "linux64/lib" + LibraryName + ".so"));
                RuntimeDependencies.Add(Path.Combine(LibraryPath, "linux64/lib" + LibraryName + ".so"));
            }
        }
Exemplo n.º 16
0
    public Core(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/CorePrivatePCH.h";

        SharedPCHHeaderFile = "Public/CoreSharedPCH.h";

        PrivateDependencyModuleNames.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)
            {
                string SDKROOT = Utils.RunLocalProcessAndReturnStdOut("/usr/bin/xcrun", "--sdk macosx --show-sdk-path");
                PublicAdditionalLibraries.Add(SDKROOT + "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport.tbd");
            }
        }
        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");
        }

        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;
    }
Exemplo n.º 17
0
    public TeamSpeak_SDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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

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

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

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

        if (bHasTeamspeakSDK)
        {
            PublicDefinitions.Add("WITH_TEAMSPEAK=1");
            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                // Add the import library
                string platform     = Target.Platform == UnrealTargetPlatform.Win32 ? "win32" : "win64";
                string LibDirectory = Path.Combine(SDKDirectory, "lib", "windows", platform);

                PublicLibraryPaths.Add(LibDirectory);
                PublicAdditionalLibraries.Add("ts3client.lib");

                string SDKLibWindows = Path.Combine(SDKDirectory, "bin", "windows", platform, "ts3client.dll");

                string binariesDir = Path.Combine(BaseDirectory, "Binaries", Target.Platform.ToString());
                string filename    = "ts3client.dll";

                if (!Directory.Exists(binariesDir))
                {
                    Directory.CreateDirectory(binariesDir);
                }

                string binPath = Path.Combine(binariesDir, filename);
                if (!File.Exists(Path.Combine(binariesDir, filename)))
                {
                    File.Copy(SDKLibWindows, binPath, true);
                }

                RuntimeDependencies.Add(binPath);
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                string binariesDir = Path.Combine(BaseDirectory, "Binaries", Target.Platform.ToString());
                string filename    = "libts3client.so";
                string binPath     = Path.Combine(binariesDir, filename);
                string SDKLibLinux = Path.Combine(SDKDirectory, "bin", "linux", "amd64", filename);

                if (!Directory.Exists(binariesDir))
                {
                    Directory.CreateDirectory(binariesDir);
                }

                if (!File.Exists(Path.Combine(binPath)))
                {
                    File.Copy(SDKLibLinux, binPath, true);
                }

                RuntimeDependencies.Add(binPath);
                PublicAdditionalLibraries.Add(Path.Combine(SDKDirectory, "bin", "linux", "amd64", "libts3client.so"));
            }
        }
        else
        {
            PublicDefinitions.Add("WITH_TEAMSPEAK=0");
        }
    }
    public AWSCore(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" });
        PrivateDependencyModuleNames.AddRange(new string[] { });

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

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

        if (bIsThirdPartyPathValid)
        {
            if (Target.Type == TargetRules.TargetType.Client)
            {
                if (!Directory.Exists(BinariesDirectory))
                {
                    Directory.CreateDirectory(BinariesDirectory);
                }

                PublicDefinitions.Add("WITH_AWSCORE=1");
                //PublicLibraryPaths.Add(ThirdPartyPath);
                if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    // dependencies
                    string CommonSoFile = System.IO.Path.Combine(ThirdPartyPath, "libaws-c-common.so");
                    if (File.Exists(CommonSoFile))
                    {
                        PublicAdditionalLibraries.Add(CommonSoFile);
                        RuntimeDependencies.Add(CommonSoFile);
                    }
                    else
                    {
                        throw new BuildException("libaws-c-common.so not found. Expected in this location: " + CommonSoFile);
                    }

                    string EventStreamSoFile = System.IO.Path.Combine(ThirdPartyPath, "libaws-c-event-stream.so");
                    if (File.Exists(EventStreamSoFile))
                    {
                        PublicAdditionalLibraries.Add(EventStreamSoFile);
                        RuntimeDependencies.Add(EventStreamSoFile);
                    }
                    else
                    {
                        throw new BuildException("libaws-c-event-stream.so not found. Expected in this location: " + EventStreamSoFile);
                    }

                    string ChecksumsSoFile = System.IO.Path.Combine(ThirdPartyPath, "libaws-checksums.so");
                    if (File.Exists(ChecksumsSoFile))
                    {
                        PublicAdditionalLibraries.Add(ChecksumsSoFile);
                        RuntimeDependencies.Add(ChecksumsSoFile);
                    }
                    else
                    {
                        throw new BuildException("libaws-checksums.so not found. Expected in this location: " + ChecksumsSoFile);
                    }

                    // aws core
                    string AWSCoreSoFile = System.IO.Path.Combine(ThirdPartyPath, "libaws-cpp-sdk-core.so");
                    if (File.Exists(AWSCoreSoFile))
                    {
                        PublicAdditionalLibraries.Add(AWSCoreSoFile);
                        RuntimeDependencies.Add(AWSCoreSoFile);
                    }
                    else
                    {
                        throw new BuildException("libaws-cpp-sdk-core.so not found. Expected in this location: " + AWSCoreSoFile);
                    }

                    // binaries
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "libaws-c-common.so")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "libaws-c-common.so"), System.IO.Path.Combine(BinariesDirectory, "libaws-c-common.so"));
                    }
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "libaws-c-event-stream.so")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "libaws-c-event-stream.so"), System.IO.Path.Combine(BinariesDirectory, "libaws-c-event-stream.so"));
                    }
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "libaws-checksums.so")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "libaws-checksums.so"), System.IO.Path.Combine(BinariesDirectory, "libaws-checksums.so"));
                    }
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "libaws-cpp-sdk-core.so")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "libaws-cpp-sdk-core.so"), System.IO.Path.Combine(BinariesDirectory, "libaws-cpp-sdk-core.so"));
                    }
                }
                else if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    // dependencies
                    string CommonLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.lib");
                    if (File.Exists(CommonLibFile))
                    {
                        PublicAdditionalLibraries.Add(CommonLibFile);
                    }
                    else
                    {
                        throw new BuildException("aws-c-common.lib not found. Expected in this location: " + CommonLibFile);
                    }

                    string CommonDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.dll");
                    if (File.Exists(CommonDLLFile))
                    {
                        PublicDelayLoadDLLs.Add("aws-c-common.dll");
                        RuntimeDependencies.Add(CommonDLLFile);
                    }
                    else
                    {
                        throw new BuildException("aws-c-common.dll not found. Expected in this location: " + CommonDLLFile);
                    }

                    string EventStreamLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.lib");
                    if (File.Exists(EventStreamLibFile))
                    {
                        PublicAdditionalLibraries.Add(EventStreamLibFile);
                    }
                    else
                    {
                        throw new BuildException("aws-c-event-stream.lib not found. Expected in this location: " + EventStreamLibFile);
                    }

                    string EventStreamDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.dll");
                    if (File.Exists(EventStreamDLLFile))
                    {
                        PublicDelayLoadDLLs.Add("aws-c-event-stream.dll");
                        RuntimeDependencies.Add(EventStreamDLLFile);
                    }
                    else
                    {
                        throw new BuildException("aws-c-event-stream.dll not found. Expected in this location: " + EventStreamDLLFile);
                    }

                    string ChecksumsLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-checksums.lib");
                    if (File.Exists(ChecksumsLibFile))
                    {
                        PublicAdditionalLibraries.Add(ChecksumsLibFile);
                    }
                    else
                    {
                        throw new BuildException("aws-checksums.lib not found. Expected in this location: " + ChecksumsLibFile);
                    }

                    string ChecksumsDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-checksums.dll");
                    if (File.Exists(ChecksumsDLLFile))
                    {
                        PublicDelayLoadDLLs.Add("aws-checksums.dll");
                        RuntimeDependencies.Add(ChecksumsDLLFile);
                    }
                    else
                    {
                        throw new BuildException("aws-checksums.dll not found. Expected in this location: " + ChecksumsDLLFile);
                    }

                    // aws core
                    string AWSCoreLibFile = System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-core.lib");
                    if (File.Exists(AWSCoreLibFile))
                    {
                        PublicAdditionalLibraries.Add(AWSCoreLibFile);
                    }
                    else
                    {
                        throw new BuildException("aws-cpp-sdk-core.lib not found. Expected in this location: " + AWSCoreLibFile);
                    }

                    string AWSCoreDLLFile = System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-core.dll");
                    if (File.Exists(AWSCoreDLLFile))
                    {
                        PublicDelayLoadDLLs.Add("aws-cpp-sdk-core.dll");
                        RuntimeDependencies.Add(AWSCoreDLLFile);
                    }
                    else
                    {
                        throw new BuildException("aws-cpp-sdk-core.dll not found. Expected in this location: " + AWSCoreDLLFile);
                    }

                    // binaries
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-c-common.dll")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-c-common.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-c-common.dll"));
                    }
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-c-event-stream.dll")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-c-event-stream.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-c-event-stream.dll"));
                    }
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-checksums.dll")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-checksums.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-checksums.dll"));
                    }
                    if (File.Exists(System.IO.Path.Combine(BinariesDirectory, "aws-cpp-sdk-core.dll")) == false)
                    {
                        File.Copy(System.IO.Path.Combine(ThirdPartyPath, "aws-cpp-sdk-core.dll"), System.IO.Path.Combine(BinariesDirectory, "aws-cpp-sdk-core.dll"));
                    }
                }
            }
            else
            {
                PublicDefinitions.Add("WITH_AWSCORE=0");
            }
        }
        else
        {
            PublicDefinitions.Add("WITH_AWSCORE=0");
        }
    }
    public WebBrowser(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicIncludePaths.Add("Runtime/WebBrowser/Public");
        PrivateIncludePaths.Add("Runtime/WebBrowser/Private");
        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "ApplicationCore",
            "RHI",
            "InputCore",
            "Serialization",
            "HTTP"
        }
            );

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Slate",
            "SlateCore"
        }
            );

        if (Target.Platform == UnrealTargetPlatform.Android ||
            Target.Platform == UnrealTargetPlatform.IOS ||
            Target.Platform == UnrealTargetPlatform.TVOS)
        {
            // We need these on mobile for external texture support
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "WebBrowserTexture",
                "Engine",
                "Launch"
            }
                );

            // We need this one on Android for URL decoding
            PrivateDependencyModuleNames.Add("HTTP");
        }

        if (Target.Platform == UnrealTargetPlatform.Win64 ||
            Target.Platform == UnrealTargetPlatform.Win32 ||
            Target.Platform == UnrealTargetPlatform.Mac ||
            Target.Platform == UnrealTargetPlatform.Linux)
        {
            PrivateDependencyModuleNames.Add("CEF3Utils");
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "CEF3"
                                                         );

            if (Target.Type != TargetType.Server)
            {
                if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    // Add contents of UnrealCefSubProcess.app directory as runtime dependencies
                    foreach (string FilePath in Directory.EnumerateFiles(Target.RelativeEnginePath + "/Binaries/Mac/UnrealCEFSubProcess.app", "*", SearchOption.AllDirectories))
                    {
                        RuntimeDependencies.Add(FilePath);
                    }
                }
                else if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    RuntimeDependencies.Add("$(EngineDir)/Binaries/" + Target.Platform.ToString() + "/UnrealCEFSubProcess");
                }
                else
                {
                    RuntimeDependencies.Add("$(EngineDir)/Binaries/" + Target.Platform.ToString() + "/UnrealCEFSubProcess.exe");
                }
            }
        }

        if (Target.Platform == UnrealTargetPlatform.PS4 &&
            Target.bCompileAgainstEngine)
        {
            PrivateDependencyModuleNames.Add("Engine");
        }

        if (Target.Platform == UnrealTargetPlatform.Lumin)
        {
            PrecompileForTargets = ModuleRules.PrecompileTargetsType.None;
        }
    }
    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",
            "PropertyEditor",
            "EditorStyle",
            "GraphColor",
            "MeshBuilderCommon",
            "MeshUtilitiesCommon",
            "MeshDescription",
            "StaticMeshDescription",
            "ToolMenus",
        }
            );

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

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

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

        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");
        }

        // Always use the official version of IntelTBB
        string IntelTBBLibs = Target.UEThirdPartySourceDirectory + "Intel/TBB/IntelTBB-2019u8/lib/";

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

            PublicIncludePaths.Add(SDKDir + "include");
            PublicAdditionalLibraries.Add(SDKDir + "lib/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", IntelTBBLibs + "Win64/vc14/tbb.dll");
            RuntimeDependencies.Add("$(TargetOutputDir)/tbbmalloc.dll", IntelTBBLibs + "Win64/vc14/tbbmalloc.dll");
            PublicDefinitions.Add("USE_EMBREE=1");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string SDKDir = Target.UEThirdPartySourceDirectory + "Intel/Embree/Embree2140/MacOSX/";

            PublicIncludePaths.Add(SDKDir + "include");
            PublicAdditionalLibraries.Add(SDKDir + "lib/libembree.2.14.0.dylib");
            PublicAdditionalLibraries.Add(IntelTBBLibs + "Mac/libtbb.dylib");
            PublicAdditionalLibraries.Add(IntelTBBLibs + "Mac/libtbbmalloc.dylib");
            RuntimeDependencies.Add("$(TargetOutputDir)/libembree.2.14.0.dylib", SDKDir + "lib/libembree.2.14.0.dylib");
            RuntimeDependencies.Add("$(TargetOutputDir)/libtbb.dylib", IntelTBBLibs + "Mac/libtbb.dylib");
            RuntimeDependencies.Add("$(TargetOutputDir)/libtbbmalloc.dylib", IntelTBBLibs + "Mac/libtbbmalloc.dylib");
            PublicDefinitions.Add("USE_EMBREE=1");
        }
        else
        {
            PublicDefinitions.Add("USE_EMBREE=0");
        }
    }
Exemplo n.º 21
0
    public GameLiftServerSDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicIncludePaths.AddRange(
            new string[] {
            "GameLiftServerSDK/Public"
        }
            );


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


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


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


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

        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)
            {
                Definitions.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");

                    PublicLibraryPaths.Add(SDKDirectory);
                    PublicAdditionalLibraries.Add(SDKLib);
                    RuntimeDependencies.Add(new RuntimeDependency(SDKLib));
                }
                else if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PublicLibraryPaths.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(new RuntimeDependency(SDKLibWindows));
                }
            }
            else
            {
                Definitions.Add("WITH_GAMELIFT=0");
            }
        }
        else
        {
            Definitions.Add("WITH_GAMELIFT=0");
        }
    }
Exemplo n.º 22
0
    public ResonanceAudio(ReadOnlyTargetRules Target) : base(Target)
    {
        string ResonanceAudioPath        = ModuleDirectory + "/Private/ResonanceAudioLibrary";
        string ResonanceAudioLibraryPath = ModuleDirectory + "/Private/ResonanceAudioLibrary/resonance_audio";
        string PFFTPath = ModuleDirectory + "/Private/ResonanceAudioLibrary/third_party/pfft";

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

        PrivateIncludePaths.AddRange(
            new string[] {
            "ResonanceAudio/Private",
            ResonanceAudioPath,
            ResonanceAudioLibraryPath,
            PFFTPath,
            "../../../../Source/Runtime/AudioMixer/Private"
        }
            );

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

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

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

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

        ShadowVariableWarningLevel = WarningLevel.Off;

        AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                     "UEOgg",
                                                     "Vorbis",
                                                     "VorbisFile",
                                                     "Eigen"
                                                     );

        if (bSupportsProceduralMesh)
        {
            PrivateDependencyModuleNames.Add("ProceduralMeshComponent");
            PrivateDefinitions.Add("SUPPORTS_PROCEDURAL_MESH=1");
        }
        else
        {
            PrivateDefinitions.Add("SUPPORTS_PROCEDURAL_MESH=0");
        }

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PrivateDefinitions.Add("PFFFT_SIMD_DISABLE=1");
            PrivateDefinitions.Add("EIGEN_HAS_CXX11_MATH=0");
        }

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

            PublicIncludePaths.Add(SDKDir + "include");
            PublicAdditionalLibraries.Add(SDKDir + "lib/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");

            PrivateDefinitions.Add("USE_EMBREE=1");
        }
        else
        {
            // In platforms that don't support Embree, we implement no-op versions of the functions.
            string SDKDir = Target.UEThirdPartySourceDirectory + "IntelEmbree/Embree2140/";
            PublicIncludePaths.Add(SDKDir + "include");
            PublicDefinitions.Add("USE_EMBREE=0");
            PrivateDefinitions.Add("EMBREE_STATIC_LIB=1");
        }
    }
Exemplo n.º 23
0
        public GoogleARCoreBase(ReadOnlyTargetRules Target) : base(Target)
        {
            PrivateIncludePaths.AddRange(
                new string[]
            {
                "GoogleARCoreBase/Private",
            }
                );

            PublicIncludePathModuleNames.Add("TargetPlatform");

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "HeadMountedDisplay",
                "AugmentedReality",
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "EngineSettings",
                "Slate",
                "SlateCore",
                "RHI",
                "RenderCore",
                "AndroidPermission",
                "GoogleARCoreRendering",
                "GoogleARCoreSDK",
                "OpenGL",
                "ProceduralMeshComponent",
                "UElibPNG",
                "zlib"
            }
                );

            PrivateIncludePathModuleNames.AddRange(
                new string[]
            {
                "Settings"                         // For editor settings panel.
            }
                );

            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                // Additional dependencies on android...
                PrivateDependencyModuleNames.Add("Launch");

                // Register Plugin Language
                AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "GoogleARCoreBase_APL.xml"));
            }

            if (Target.bBuildEditor)
            {
                string ExecName = "";
                if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    ExecName = "Windows/arcoreimg.exe";
                }
                else if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    ExecName = "Linux/arcoreimg";
                }
                else if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    ExecName = "Mac/ptdbtool_macos_lipobin";
                }

                if (ExecName.Length > 0)
                {
                    RuntimeDependencies.Add("$(EngineDir)/Plugins/Runtime/AR/Google/GoogleARCore/Binaries/ThirdParty/Google/ARCoreImg/" + ExecName);
                }
            }

            bFasterWithoutUnity = false;
        }
Exemplo n.º 24
0
    public UnrealLightmass(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicIncludePaths.Add("Runtime/Launch/Public");

        PrivateDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "zlib", "SwarmInterface", "Projects", "ApplicationCore" });

        PublicDefinitions.Add("UE_LIGHTMASS=1");

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

            // Unreallightmass requires GetProcessMemoryInfo exported by psapi.dll. http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
            PublicSystemLibraries.Add("psapi.lib");
            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "Messaging",
            }
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)
        {
            // On Mac/Linux UnrealLightmass is executed locally and communicates with the editor using Messaging module instead of SwarmAgent
            // @todo: allow for better plug-in support in standalone Slate apps
            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "Networking",
                "Sockets",
                "Messaging",
                "UdpMessaging",
            }
                );

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

        // Lightmass ray tracing is 8% faster with buffer security checks disabled due to fixed size arrays on the stack in the kDOP ray tracing functions
        // Warning: This means buffer overwrites will not be detected
        bEnableBufferSecurityChecks = false;

        PrivateIncludePaths.Add("Runtime/Launch/Private");                      // For LaunchEngineLoop.cpp include
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/Launch");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/ImportExport");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/CPUSolver");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/Lighting");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Misc");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Math");
        PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Templates");

        // Always use the official version of IntelTBB
        string IntelTBBLibs = Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-2019u8/lib/";

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

            PublicIncludePaths.Add(SDKDir + "include");
            PublicAdditionalLibraries.Add(SDKDir + "lib/embree.lib");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/Win64/embree.dll");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/Win64/tbb.dll", IntelTBBLibs + "Win64/vc14/tbb.dll");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/Win64/tbbmalloc.dll", IntelTBBLibs + "Win64/vc14/tbbmalloc.dll");
            PublicDefinitions.Add("USE_EMBREE=1");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string SDKDir = Target.UEThirdPartySourceDirectory + "IntelEmbree/Embree270/MacOSX/";

            PublicIncludePaths.Add(SDKDir + "include");
            PublicAdditionalLibraries.Add(SDKDir + "lib/libembree.2.dylib");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/Mac/libembree.2.dylib");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/Mac/libtbb.dylib", IntelTBBLibs + "Mac/libtbb.dylib");             // Take latest version to avoid overwriting the editor's copy
            RuntimeDependencies.Add("$(EngineDir)/Binaries/Mac/libtbbmalloc.dylib", IntelTBBLibs + "Mac/libtbbmalloc.dylib");
            PublicDefinitions.Add("USE_EMBREE=1");
        }
        else
        {
            PublicDefinitions.Add("USE_EMBREE=0");
        }
    }
Exemplo n.º 25
0
    public FBX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string FBXSDKDir = Target.UEThirdPartySourceDirectory + "FBX/2018.1.1/";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            FBXSDKDir + "include",
            FBXSDKDir + "include/fbxsdk",
        }
            );


        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string FBxLibPath = FBXSDKDir + "lib/vs" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";

            FBxLibPath += "x64/release/";
            PublicLibraryPaths.Add(FBxLibPath);

            if (Target.LinkType != TargetLinkType.Monolithic)
            {
                PublicAdditionalLibraries.Add("libfbxsdk.lib");

                // We are using DLL versions of the FBX libraries
                PublicDefinitions.Add("FBXSDK_SHARED");

                RuntimeDependencies.Add("$(TargetOutputDir)/libfbxsdk.dll", FBxLibPath + "libfbxsdk.dll");
            }
            else
            {
                if (Target.bUseStaticCRT)
                {
                    PublicAdditionalLibraries.Add("libfbxsdk-mt.lib");
                }
                else
                {
                    PublicAdditionalLibraries.Add("libfbxsdk-md.lib");
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string FBxLibPath = FBXSDKDir + "lib/clang/release/";
            PublicAdditionalLibraries.Add(FBxLibPath + "libfbxsdk.dylib");
            RuntimeDependencies.Add("$(TargetOutputDir)/libfbxsdk.dylib", FBxLibPath + "libfbxsdk.dylib");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            string LibDir = FBXSDKDir + "lib/gcc4/" + Target.Architecture + "/release/";
            if (!Target.bIsEngineInstalled && !Directory.Exists(LibDir))
            {
                string Err = string.Format("FBX SDK not found in {0}", LibDir);
                System.Console.WriteLine(Err);
                throw new BuildException(Err);
            }

            PublicAdditionalLibraries.Add(LibDir + "/libfbxsdk.a");

            /* There is a bug in fbxarch.h where is doesn't do the check
             * for clang under linux */
            PublicDefinitions.Add("FBXSDK_COMPILER_CLANG");

            // libfbxsdk has been built against libstdc++ and as such needs this library
            PublicAdditionalLibraries.Add("stdc++");
        }
    }
Exemplo n.º 26
0
    public Slate(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateDefinitions.Add("SLATE_MODULE=1");
        SharedPCHHeaderFile = "Public/SlateSharedPCH.h";

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "ApplicationCore",
            "InputCore",
            "Json",
            "SlateCore",
            "ImageWrapper"
        });

        PrivateIncludePaths.AddRange(
            new string[] {
            "Runtime/Slate/Private",
            "Runtime/Slate/Private/Framework",
            "Runtime/Slate/Private/Framework/Application",
            "Runtime/Slate/Private/Framework/Commands",
            "Runtime/Slate/Private/Framework/Docking",
            "Runtime/Slate/Private/Framework/Layout",
            "Runtime/Slate/Private/Framework/MultiBox",
            "Runtime/Slate/Private/Framework/Notifications",
            "Runtime/Slate/Private/Framework/Styling",
            "Runtime/Slate/Private/Framework/Text",
            "Runtime/Slate/Private/Framework/Text/IOS",
            "Runtime/Slate/Private/Widgets/Colors",
            "Runtime/Slate/Private/Widgets/Docking",
            "Runtime/Slate/Private/Widgets/Images",
            "Runtime/Slate/Private/Widgets/Input",
            "Runtime/Slate/Private/Widgets/Layout",
            "Runtime/Slate/Private/Widgets/Notifications",
            "Runtime/Slate/Private/Widgets/Text",
            "Runtime/Slate/Private/Widgets/Views",

            "Runtime/Toolbox/Public/"
        });

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "XInput");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Linux))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2");
        }

        // Add slate runtime dependencies
        if (Target.bUsesSlate)
        {
            RuntimeDependencies.Add("$(EngineDir)/Content/Slate/...", StagedFileType.UFS);
            RuntimeDependencies.Add("$(EngineDir)/Content/SlateDebug/...", StagedFileType.DebugNonUFS);

            if (Target.ProjectFile != null)
            {
                RuntimeDependencies.Add("$(ProjectDir)/Content/Slate/...", StagedFileType.UFS);
                RuntimeDependencies.Add("$(ProjectDir)/Content/SlateDebug/...", StagedFileType.DebugNonUFS);
            }
        }

        if (Target.bBuildDeveloperTools)
        {
            DynamicallyLoadedModuleNames.Add("Settings");
        }
    }
    public GameLiftClientSDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicIncludePaths.Add(System.IO.Path.Combine(ModuleDirectory, "Public"));

        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/GameLiftClientSDKPrivatePCH.h";

        bEnableExceptions = true;

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

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

        if (bHasGameLiftSDK)
        {
            if (Target.Type == TargetRules.TargetType.Server)
            {
                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");
                     *
                     * //PublicAdditionalLibraries.Add(SDKDirectory);
                     * PublicAdditionalLibraries.Add(SDKLib);
                     * RuntimeDependencies.Add(SDKLib);*/
                }
                else if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    //PublicAdditionalLibraries.Add(SDKDirectory);
                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-c-common.lib"));
                    PublicDelayLoadDLLs.Add("aws-c-common.dll");
                    string CommonLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-c-common.dll");
                    RuntimeDependencies.Add(CommonLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-c-event-stream.lib"));
                    PublicDelayLoadDLLs.Add("aws-c-event-stream.dll");
                    string EventStreamLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-c-event-stream.dll");
                    RuntimeDependencies.Add(EventStreamLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-checksums.lib"));
                    PublicDelayLoadDLLs.Add("aws-checksums.dll");
                    string ChecksumsLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-checksums.dll");
                    RuntimeDependencies.Add(ChecksumsLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-cognito-identity.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-cognito-identity.dll");
                    string CognitoIdentityLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-cognito-identity.dll");
                    RuntimeDependencies.Add(CognitoIdentityLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-cognito-idp.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-cognito-idp.dll");
                    string CognitoIdpLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-cognito-idp.dll");
                    RuntimeDependencies.Add(CognitoIdpLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-core.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-core.dll");
                    string CoreLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-core.dll");
                    RuntimeDependencies.Add(CoreLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-iam.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-iam.dll");
                    string IamLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-iam.dll");
                    RuntimeDependencies.Add(IamLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-kinesis.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-kinesis.dll");
                    string KinesisLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-kinesis.dll");
                    RuntimeDependencies.Add(KinesisLibWindows);

                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-lambda.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-lambda.dll");
                    string LambdaLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-lambda.dll");
                    RuntimeDependencies.Add(LambdaLibWindows);
                }
            }
        }
    }
Exemplo n.º 28
0
    public Steamworks(ReadOnlyTargetRules Target) : base(Target)
    {
        /** Mark the current version of the Steam SDK */
        string SteamVersion = "v139";

        Type = ModuleType.External;

        PublicDefinitions.Add("STEAM_SDK_VER=TEXT(\"1.39\")");
        PublicDefinitions.Add("STEAM_SDK_VER_PATH=TEXT(\"Steam" + SteamVersion + "\")");

        string SdkBase = Target.UEThirdPartySourceDirectory + "Steamworks/Steam" + SteamVersion + "/sdk";

        if (!Directory.Exists(SdkBase))
        {
            string Err = string.Format("steamworks SDK not found in {0}", SdkBase);
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }

        PublicIncludePaths.Add(SdkBase + "/public");

        string LibraryPath = SdkBase + "/redistributable_bin/";
        string LibraryName = "steam_api";

        if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(LibraryPath);
            PublicAdditionalLibraries.Add(LibraryName + ".lib");
            PublicDelayLoadDLLs.Add(LibraryName + ".dll");

            string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win32/", SteamVersion);
            RuntimeDependencies.Add(SteamBinariesDir + "steam_api.dll");

            if (Target.Type == TargetType.Server)
            {
                RuntimeDependencies.Add(SteamBinariesDir + "steamclient.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "tier0_s.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "vstdlib_s.dll");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(LibraryPath + "win64");
            PublicAdditionalLibraries.Add(LibraryName + "64.lib");
            PublicDelayLoadDLLs.Add(LibraryName + "64.dll");

            string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win64/", SteamVersion);
            RuntimeDependencies.Add(SteamBinariesDir + LibraryName + "64.dll");

            if (Target.Type == TargetType.Server)
            {
                RuntimeDependencies.Add(SteamBinariesDir + "steamclient64.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "tier0_s64.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "vstdlib_s64.dll");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string SteamBinariesPath = String.Format(Target.UEThirdPartyBinariesDirectory + "Steamworks/Steam{0}/Mac/", SteamVersion);
            LibraryPath = SteamBinariesPath + "libsteam_api.dylib";
            PublicDelayLoadDLLs.Add(LibraryPath);
            RuntimeDependencies.Add(LibraryPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                LibraryPath += "linux64";
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add(LibraryName);
            }
            else
            {
                LibraryPath += "linux64/libsteam_api.so";
                PublicDelayLoadDLLs.Add(LibraryPath);
            }
            string SteamBinariesPath = String.Format(Target.UEThirdPartyBinariesDirectory + "Steamworks/Steam{0}/{1}", SteamVersion, Target.Architecture);
            PrivateRuntimeLibraryPaths.Add(SteamBinariesPath);
            PublicAdditionalLibraries.Add(SteamBinariesPath + "/libsteam_api.so");
            RuntimeDependencies.Add(SteamBinariesPath + "/libsteam_api.so");
        }
    }
Exemplo n.º 29
0
    public AlembicLib(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 ||
            Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)
        {
            bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT);

            string LibDir = ModuleDirectory + "/AlembicDeploy/";
            string Platform;
            bool   bAllowDynamicLibs = true;
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win64:
                Platform = "x64";
                LibDir  += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                break;

            case UnrealTargetPlatform.Mac:
                Platform          = "Mac";
                bAllowDynamicLibs = false;
                break;

            case UnrealTargetPlatform.Linux:
                Platform          = "Linux";
                bAllowDynamicLibs = false;
                break;

            default:
                return;
            }
            LibDir = LibDir + "/" + Platform + "/lib/";
            PublicLibraryPaths.Add(LibDir);

            string LibPostFix   = bDebug && bAllowDynamicLibs ? "d" : "";
            string LibExtension = (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux) ? ".a" : ".lib";

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

                List <string> ReqLibraryNames = new List <string>();
                ReqLibraryNames.AddRange
                (
                    new string[] {
                    "Half",
                    "Iex",
                    "IlmThread",
                    "Imath",
                    "IexMath",
                    (bDebug && bAllowDynamicLibs) ? "hdf5_" : "hdf5",
                    "Alembic"
                });
                foreach (string LibraryName in ReqLibraryNames)
                {
                    PublicAdditionalLibraries.Add(LibraryName + LibPostFix + LibExtension);
                }

                if (Target.bDebugBuildsActuallyUseDebugCRT && bDebug)
                {
                    RuntimeDependencies.Add("$(EngineDir)/Plugins/Experimental/AlembicImporter/Binaries/Win64/zlibd1.dll");
                    RuntimeDependencies.Add("$(EngineDir)/Plugins/Experimental/AlembicImporter/Binaries/Win64/hdf5_D.dll");
                }
                else
                {
                    RuntimeDependencies.Add("$(EngineDir)/Plugins/Experimental/AlembicImporter/Binaries/Win64/hdf5.dll");
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                List <string> ReqLibraryNames = new List <string>();
                ReqLibraryNames.AddRange
                (
                    new string[] {
                    "libHalf",
                    "libIex",
                    "libIlmThread",
                    "libImath",
                    (bDebug && bAllowDynamicLibs) ? "hdf5_" : "hdf5",
                    "libAlembic"
                });

                foreach (string LibraryName in ReqLibraryNames)
                {
                    PublicAdditionalLibraries.Add(LibDir + LibraryName + LibPostFix + LibExtension);
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                List <string> ReqLibraryNames = new List <string>();
                ReqLibraryNames.AddRange
                (
                    new string[] {
                    "libHalf",
                    "libIex",
                    "libIlmThread",
                    "libImath",
                    "hdf5",
                    "libAlembic"
                });

                foreach (string LibraryName in ReqLibraryNames)
                {
                    PublicAdditionalLibraries.Add(LibDir + Target.Architecture + "/" + LibraryName + LibExtension);
                }
            }

            PublicIncludePaths.Add(ModuleDirectory + "/AlembicDeploy/include/");
            PublicIncludePaths.Add(ModuleDirectory + "/AlembicDeploy/include/OpenEXR/");
        }
    }
Exemplo n.º 30
0
    public HoloLensAR(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Engine",
            "MixedRealityInteropLibrary",
            "MRMesh"
            // ... add other public dependencies that you statically link with here ...
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "ApplicationCore",
            "HeadMountedDisplay",
            "AugmentedReality",
            "RenderCore",
            "RHI",
            "Projects",
            // ... add private dependencies that you statically link with here ...
        }
            );

        if (Target.bBuildEditor == true)
        {
            PrivateDependencyModuleNames.Add("UnrealEd");
        }
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.MixedReality.QR.dll"));
            RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.MixedReality.QR.winmd"));
            RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.MixedReality.SceneUnderstanding.dll"));
            RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.MixedReality.SceneUnderstanding.winmd"));
            PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=1");
            foreach (var Dll in Directory.EnumerateFiles(Path.Combine(Target.UEThirdPartyBinariesDirectory, "Windows/x64"), "*_app.dll"))
            {
                RuntimeDependencies.Add(Dll);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.MixedReality.QR.dll"));
            RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.MixedReality.QR.winmd"));

            // Add a dependency to SceneUnderstanding.dll if present
            string SceneUnderstandingDllPath   = System.IO.Path.Combine(Target.UEThirdPartyBinariesDirectory, "HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.MixedReality.SceneUnderstanding.dll");
            string SceneUnderstandingWinMDPath = System.IO.Path.Combine(Target.UEThirdPartyBinariesDirectory, "HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.MixedReality.SceneUnderstanding.winmd");
            if (System.IO.File.Exists(SceneUnderstandingDllPath) && System.IO.File.Exists(SceneUnderstandingWinMDPath))
            {
                RuntimeDependencies.Add(SceneUnderstandingDllPath);
                RuntimeDependencies.Add(SceneUnderstandingWinMDPath);
                PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=1");
            }
            else
            {
                PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=0");
            }
        }

        AddEngineThirdPartyPrivateStaticDependencies(Target, "WindowsMixedRealityInterop");

        PublicDefinitions.Add("WITH_WINDOWS_MIXED_REALITY=1");
    }