コード例 #1
0
    public Engine(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateIncludePaths.Add("../Shaders/Shared");

        PrivatePCHHeaderFile = "Private/EnginePrivatePCH.h";

        SharedPCHHeaderFile = "Public/EngineSharedPCH.h";

        PublicIncludePathModuleNames.AddRange(new string[] { "Renderer", "PacketHandler", "AudioMixer", "AudioMixerCore", "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",
            "MovieSceneCapture",
            "AutomationWorker",
            "MovieSceneCapture",
            "DesktopPlatform",
        }
            );

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

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

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

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

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

        // Cross platform Audio Codecs:
        AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                     "UEOgg",
                                                     "Vorbis",
                                                     "VorbisFile",
                                                     "libOpus"
                                                     );

        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");
        CircularlyReferencedDependentModules.Add("AudioMixer");

        if (Target.Type == TargetType.Editor)
        {
            PrivateIncludePathModuleNames.Add("Foliage");
        }

        // 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",
            "LevelSequence",
            "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.Type == TargetType.Editor)
        {
            PrivateIncludePathModuleNames.Add("MeshUtilities");
            PrivateIncludePathModuleNames.Add("MeshUtilitiesCommon");

            DynamicallyLoadedModuleNames.Add("MeshUtilities");

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

            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",
                    "LinuxAArch64NoEditorTargetPlatform",
                    "LinuxServerTargetPlatform",
                    "LinuxAArch64ServerTargetPlatform",
                    "LinuxClientTargetPlatform",
                    "LinuxAArch64ClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                    "LinuxPlatformEditor",
                }
                    );
            }
        }

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

        if (Target.bWithLiveCoding)
        {
            DynamicallyLoadedModuleNames.Add("LiveCoding");
        }

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

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "PhysicsSQ",
            "ChaosSolvers"
        }
            );

        // 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))
        {
            // Head Mounted Display support
//			PrivateIncludePathModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
//			DynamicallyLoadedModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            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);
        }
    }
コード例 #2
0
    public Engine(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/EnginePrivatePCH.h";

        SharedPCHHeaderFile = "Public/EngineSharedPCH.h";

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

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

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "TargetPlatform",
            "ImageWrapper",
            "HeadMountedDisplay",
            "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",
            "MessagingCommon",
            "RenderCore",
            "RHI",
            "ShaderCore",
            "UtilityShaders",
            "AssetRegistry",                     // Here until FAssetData is moved to engine
            "EngineMessages",
            "EngineSettings",
            "SynthBenchmark",
            "GameplayTags",
            "AIModule",
            "DatabaseSupport",
            "PacketHandler",
            "HardwareSurvey",
        }
            );

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

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

        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("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",
            "MRMesh",
            "StreamingPauseRendering",
        }
            );

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

            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "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");
                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.Platform == UnrealTargetPlatform.Linux)
            {
                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");
        }

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

        if (Target.bCompilePhysX)
        {
            // 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.Platform == UnrealTargetPlatform.Android)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile"
                                                         );
        }

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

        if (Target.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 (Target.bBuildEditor || Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            RuntimeDependencies.Add("$(EngineDir)/Content/Stats/...", StagedFileType.UFS);
        }
    }
コード例 #3
0
ファイル: Core.Build.cs プロジェクト: nikimar1/cloneofg4g2019
    public Core(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/CorePrivatePCH.h";

        SharedPCHHeaderFile = "Public/CoreSharedPCH.h";

        PrivateDependencyModuleNames.Add("BuildSettings");

        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 == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "zlib");

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

            if (Target.Platform == UnrealTargetPlatform.Win64 && 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");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "IntelTBB",
                                                         "zlib",
                                                         "PLCrashReporter",
                                                         "rd_route"
                                                         );
            PublicFrameworks.AddRange(new string[] { "Cocoa", "Carbon", "IOKit", "Security" });

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

            PrivateIncludePathModuleNames.Add("ApplicationCore");

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

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

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

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


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

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

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

        WhitelistRestrictedFolders.Add("Private/NoRedist");

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

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

        // 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)
        {
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Mac:
            case UnrealTargetPlatform.Linux:
            //case UnrealTargetPlatform.Win32: // 32-bit windows can technically be supported, but will likely run out of virtual memory space quickly
            //case UnrealTargetPlatform.XboxOne: // XboxOne could be supported, as it's similar enough to Win64
            case UnrealTargetPlatform.Win64:
                bWithMallocStomp = true;
                break;
            }
        }

        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"));
    }
コード例 #4
0
    public Core(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/CorePrivatePCH.h";

        SharedPCHHeaderFile = "Public/CoreSharedPCH.h";

        bAddDefaultIncludePaths = false;

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

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

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

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

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

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

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

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

            PrivateIncludePathModuleNames.Add("ApplicationCore");

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

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

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

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


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

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

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

        WhitelistRestrictedFolders.Add("Private/NoRedist");

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

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