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

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string RootPath = Target.UEThirdPartySourceDirectory + "Vulkan";

            PublicSystemIncludePaths.Add(RootPath + "/Include");
            PublicSystemIncludePaths.Add(RootPath + "/Include/vulkan");

            // Let's always delay load the vulkan dll as not everyone has it installed
            PublicDelayLoadDLLs.Add("vulkan-1.dll");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            // no need to add the library, should be loaded via SDL
            string RootPath = Target.UEThirdPartySourceDirectory + "Vulkan";

            PublicSystemIncludePaths.Add(RootPath + "/Include");
            PublicSystemIncludePaths.Add(RootPath + "/Include/vulkan");
        }
    }
예제 #2
0
    public Crunch(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string BasePath = Target.UEThirdPartySourceDirectory + "Crunch/";

        PublicSystemIncludePaths.Add(BasePath + "include");

#if false
        string LibPath = BasePath + "Lib/";


        if (Target.Type == TargetType.Editor)
        {
            // link with lib to allow encoding
            if (Target.Platform == UnrealTargetPlatform.Win32 ||
                Target.Platform == UnrealTargetPlatform.Win64)
            {
#if false
                LibPath += (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64/" : "Win32/";
                PublicLibraryPaths.Add(LibPath);
                PublicAdditionalLibraries.Add("crnlib.lib");
#endif
                string Err = "Crunch not setup yet for this platform";
                System.Console.WriteLine(Err);
                throw new BuildException(Err);
            }
            else
            {
                string Err = "Crunch not setup yet for this platform";
                System.Console.WriteLine(Err);
                throw new BuildException(Err);
            }
        }
#endif
    }
예제 #3
0
    public DirectSound(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string DirectXSDKDir = Target.UEThirdPartySourceDirectory + "Windows/DirectX";

        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x64");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x86");
        }

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "dxguid.lib",
            "dsound.lib"
        }
            );
    }
예제 #4
0
    public libprotobuf(TargetInfo Target)
    {
        Type = ModuleType.External;

        bool is_supported = false;

        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            is_supported = true;

            string vs_path = "vs"
                             + WindowsPlatform.GetVisualStudioCompilerVersionName()
                             + ((Target.Platform == UnrealTargetPlatform.Win64) ? "win64" : "");
            string protobuf_lib_directory_full_path = System.IO.Path.Combine(ModuleDirectoryFullPath, "lib", vs_path);

            PublicLibraryPaths.Add(protobuf_lib_directory_full_path);

            PublicAdditionalLibraries.Add("libprotobuf.lib");

            Definitions.AddRange(
                new string[]
            {
                ((Target.Platform == UnrealTargetPlatform.Win64) ? "WIN64" : "WIN32"),
                "_WINDOWS",
                "NDEBUG",
                "GOOGLE_PROTOBUF_CMAKE_BUILD",
            });
        }

        if (is_supported)
        {
            string protobuf_code_directory_full_path = System.IO.Path.Combine(ModuleDirectoryFullPath, "protobuf", "src");

            PublicSystemIncludePaths.Add(protobuf_code_directory_full_path);
        }
    }
예제 #5
0
    public IntelMetricsDiscovery(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string IntelMetricsDiscoveryPath = Target.UEThirdPartySourceDirectory + "IntelMetricsDiscovery/MetricsDiscoveryHelper/";
        bool   bUseDebugBuild            = false;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string PlatformName = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
            string BuildType    = bUseDebugBuild ? "-md-debug" : "-md-release";

            PublicSystemIncludePaths.Add(IntelMetricsDiscoveryPath + "build/include/metrics_discovery/");

            string LibDir = IntelMetricsDiscoveryPath + "build/lib/" + PlatformName + BuildType + "/";
            PublicAdditionalLibraries.Add(LibDir + "metrics_discovery_helper.lib");

            PublicDefinitions.Add("INTEL_METRICSDISCOVERY=1");
        }
        else
        {
            PublicDefinitions.Add("INTEL_METRICSDISCOVERY=0");
        }
    }
예제 #6
0
    public XInput(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string DirectXSDKDir = "";

        if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            DirectXSDKDir = Target.WindowsPlatform.bUseWindowsSDK10 ?
                            Target.UEThirdPartySourceDirectory + "Windows/DirectXLegacy" :
                            Target.UEThirdPartySourceDirectory + "Windows/DirectX";
        }
        else
        {
            DirectXSDKDir = Target.UEThirdPartySourceDirectory + "Windows/DirectX";
        }

        // Ensure correct include and link paths for xinput so the correct dll is loaded (xinput1_3.dll)
        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            PublicSystemLibraries.Add("xinputuap.lib");
        }
        else
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicAdditionalLibraries.Add(DirectXSDKDir + "/Lib/x64/XInput.lib");
            }
            else if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicAdditionalLibraries.Add(DirectXSDKDir + "/Lib/x86/XInput.lib");
            }
        }
    }
예제 #7
0
    public DX11Input(TargetInfo Target)
    {
        Type = ModuleType.External;

        string DirectXSDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "Windows/DirectX";

        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x64");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x86");
        }

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "dxguid.lib",
            "dinput8.lib"
        }
            );
    }
예제 #8
0
    public IntelTBB(TargetInfo Target)
    {
        Type = ModuleType.External;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string IntelTBBPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelTBB/";
            switch (WindowsPlatform.Compiler)
            {
            case WindowsCompiler.VisualStudio2017:
            case WindowsCompiler.VisualStudio2015: IntelTBBPath += "IntelTBB-4.4u3/"; break;

            case WindowsCompiler.VisualStudio2013: IntelTBBPath += "IntelTBB-4.0/"; break;
            }

            PublicSystemIncludePaths.Add(IntelTBBPath + "Include");

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015 || WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2017)
                {
                    PublicLibraryPaths.Add(IntelTBBPath + "lib/Win64/vc14");
                }
                else if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2013)
                {
                    PublicLibraryPaths.Add(IntelTBBPath + "lib/Win64/vc12");
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015 || WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2017)
                {
                    PublicLibraryPaths.Add(IntelTBBPath + "lib/Win32/vc14");
                }
                else if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2013)
                {
                    PublicLibraryPaths.Add(IntelTBBPath + "lib/Win32/vc12");
                }
            }

            // Disable the #pragma comment(lib, ...) used by default in MallocTBB...
            // We want to explicitly include the library.
            Definitions.Add("__TBBMALLOC_BUILD=1");

            string LibName = "tbbmalloc";
            if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                LibName += "_debug";
            }
            LibName += ".lib";
            PublicAdditionalLibraries.Add(LibName);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicSystemIncludePaths.AddRange(
                new string[] {
                UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/include",
            }
                );

            PublicAdditionalLibraries.AddRange(
                new string[] {
                UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/lib/Mac/libtbb.a",
                UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/lib/Mac/libtbbmalloc.a",
            }
                );
        }
    }
예제 #9
0
    public GoogleSTT(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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


        PrivateIncludePaths.AddRange(
            new string[] {
            // ... add other private include paths required here ...
            Path.GetFullPath(Path.Combine(EngineDirectory, "Source/Runtime/AudioCaptureImplementations/AudioCaptureRtAudio/Private")),
        }
            );

        PublicSystemIncludePaths.AddRange(
            new string[] {
            SystemPath + "Include/10.0.18362.0/um",
            SystemPath + "Include/10.0.18362.0/shared",
        }
            );

        PublicSystemLibraryPaths.AddRange(
            new string[] {
            SystemPath + "Lib/10.0.18362.0/um/x64",
        }
            );

        PublicSystemLibraries.AddRange(
            new string[] {
            "Crypt32.Lib",
            "bcrypt.lib",
            "Winhttp.lib",
        }
            );

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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "AudioCaptureCore",
            "AudioCaptureRtAudio",
            // ... add private dependencies that you statically link with here ...
        }
            );


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

        PublicDefinitions.AddRange(
            new string[] {
            "CPPREST_FORCE_PPLX=0",
            "_WIN32_WINNT_VISTA=0",
        }
            );

        LoadThirdParty(Target);
    }
예제 #10
0
    public UEOgg(TargetInfo Target)
    {
        Type = ModuleType.External;

        string OggPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "Ogg/libogg-1.2.2/";

        PublicSystemIncludePaths.Add(OggPath + "include");

        string OggLibPath = OggPath + "lib/";

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            OggLibPath += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(OggLibPath);

            PublicAdditionalLibraries.Add("libogg_64.lib");

            PublicDelayLoadDLLs.Add("libogg_64.dll");

            RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Ogg/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libogg_64.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            OggLibPath += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(OggLibPath);

            PublicAdditionalLibraries.Add("libogg.lib");

            PublicDelayLoadDLLs.Add("libogg.dll");

            RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Ogg/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libogg.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            OggLibPath += "HTML5Win32";
            PublicLibraryPaths.Add(OggLibPath);
            PublicAdditionalLibraries.Add("libogg.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.Add(OggPath + "macosx/libogg.dylib");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            if (UEBuildConfiguration.bCompileForSize)
            {
                PublicAdditionalLibraries.Add(OggLibPath + "HTML5/libogg_Oz.bc");
            }
            else
            {
                PublicAdditionalLibraries.Add(OggLibPath + "HTML5/libogg.bc");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // Filtered in the toolchain.
            PublicLibraryPaths.Add(OggLibPath + "Android/ARMv7");
            PublicLibraryPaths.Add(OggLibPath + "Android/ARM64");
            PublicLibraryPaths.Add(OggLibPath + "Android/x86");
            PublicLibraryPaths.Add(OggLibPath + "Android/x64");

            PublicAdditionalLibraries.Add("ogg");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.IsMonolithic)
            {
                PublicAdditionalLibraries.Add(OggLibPath + "Linux/" + Target.Architecture + "/libogg.a");
            }
            else
            {
                PublicAdditionalLibraries.Add(OggLibPath + "Linux/" + Target.Architecture + "/libogg_fPIC.a");
            }
        }
    }
예제 #11
0
    public Python(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        var EngineDir = Path.GetFullPath(Target.RelativeEnginePath);

        PythonSDKPaths PythonSDK = 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
            var PythonRoot = System.Environment.GetEnvironmentVariable("UE_PYTHON_DIR");
            if (PythonRoot != null)
            {
                PythonSDK = DiscoverPythonSDK(PythonRoot);
            }
        }

        // Perform auto-detection to try and find the Python SDK
        if (PythonSDK == null)
        {
            var PythonBinaryTPSDir = Path.Combine(EngineDir, "Binaries", "ThirdParty", "Python");
            var PythonSourceTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python");

            var PotentialSDKs = new List <PythonSDKPaths>();

            // 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)
            {
                var PlatformDir = Target.Platform == UnrealTargetPlatform.Win32 ? "Win32" : "Win64";

                PotentialSDKs.AddRange(
                    new PythonSDKPaths[] {
                    new PythonSDKPaths(Path.Combine(PythonBinaryTPSDir, PlatformDir), new List <string>()
                    {
                        Path.Combine(PythonSourceTPSDir, PlatformDir, "include")
                    }, Path.Combine(PythonSourceTPSDir, PlatformDir, "libs"), "python27.lib"),
                    //DiscoverPythonSDK("C:/Program Files/Python36"),
                    DiscoverPythonSDK("C:/Python27"),
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PotentialSDKs.AddRange(
                    new PythonSDKPaths[] {
                    new PythonSDKPaths(Path.Combine(PythonBinaryTPSDir, "Mac"), new List <string>()
                    {
                        Path.Combine(PythonSourceTPSDir, "Mac", "include")
                    }, Path.Combine(PythonBinaryTPSDir, "Mac"), "libpython2.7.dylib")
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                if (Target.Architecture.StartsWith("x86_64"))
                {
                    var PlatformDir = Target.Platform.ToString();

                    PotentialSDKs.AddRange(
                        new PythonSDKPaths[] {
                        new PythonSDKPaths(
                            Path.Combine(PythonBinaryTPSDir, PlatformDir),
                            new List <string>()
                        {
                            Path.Combine(PythonSourceTPSDir, PlatformDir, "include", "python2.7"),
                            Path.Combine(PythonSourceTPSDir, PlatformDir, "include", Target.Architecture)
                        },
                            Path.Combine(PythonSourceTPSDir, PlatformDir, "lib"), "libpython2.7.a"),
                    });
                }
            }

            foreach (var PotentialSDK in PotentialSDKs)
            {
                if (PotentialSDK.IsValid())
                {
                    PythonSDK = PotentialSDK;
                    break;
                }
            }
        }

        // Make sure the Python SDK is the correct architecture
        if (PythonSDK != 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(PythonSDK.PythonRoot, "-c \"import struct; print(struct.calcsize('P'))\"");
                Result = Result != null?Result.Replace("\r", "").Replace("\n", "") : null;

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

        if (PythonSDK == null)
        {
            PublicDefinitions.Add("WITH_PYTHON=0");
            Console.WriteLine("Python SDK not found");
        }
        else
        {
            // If the Python install we're using is within the Engine directory, make the path relative so that it's portable
            string EngineRelativePythonRoot = PythonSDK.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);
                foreach (string FileName in Directory.EnumerateFiles(PythonSDK.PythonRoot, "*", SearchOption.AllDirectories))
                {
                    if (!FileName.EndsWith(".pyc", System.StringComparison.OrdinalIgnoreCase))
                    {
                        RuntimeDependencies.Add(FileName);
                    }
                }
                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.AddRange(PythonSDK.PythonIncludePath);
            if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                // Mac doesn't understand PublicLibraryPaths
                PublicAdditionalLibraries.Add(Path.Combine(PythonSDK.PythonLibPath, PythonSDK.PythonLibName));
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                PublicAdditionalLibraries.Add(Path.Combine(PythonSDK.PythonLibPath, PythonSDK.PythonLibName));
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Python/Linux/lib/libpython2.7.so.1.0");
            }
            else
            {
                PublicLibraryPaths.Add(PythonSDK.PythonLibPath);
                PublicAdditionalLibraries.Add(PythonSDK.PythonLibName);
            }
        }
    }
예제 #12
0
        public IM4U(ReadOnlyTargetRules Target) : base(Target)
        {
            string LibEHWinSourcePath = ThirdPartyPath + "LibEncodeHelperWin/";

            string LibEHWinIncPath = LibEHWinSourcePath + "LibEncodeHelperWin/";

            PublicSystemIncludePaths.Add(LibEHWinIncPath);

            string LibEHWinLibPath = LibEHWinSourcePath + "lib/";

            PublicLibraryPaths.Add(LibEHWinLibPath);

            bool FoundLibEHWinDirs = true;

            if (!Directory.Exists(LibEHWinSourcePath))
            {
                System.Console.WriteLine(string.Format("LibEncodeHelperWin source path not found: {0}", LibEHWinSourcePath));
                FoundLibEHWinDirs = false;
            }

            string LibName;

            if ((Target.Platform == UnrealTargetPlatform.Win64 ||
                 Target.Platform == UnrealTargetPlatform.Win32) &&
                FoundLibEHWinDirs)
            {
                if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    LibName = "LibEncodeHelperWin64";
                }
                else
                {
                    LibName = "LibEncodeHelperWin32";
                }

                bool HaveDebugLib = File.Exists(LibEHWinLibPath + LibName + "D" + ".dll");

                if (HaveDebugLib &&
                    Target.Configuration == UnrealTargetConfiguration.Debug &&
                    Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    LibName += "D";
                }

                PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, LibName + ".lib"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicAdditionalLibraries.Add("/usr/lib/libiconv.dylib");
            }


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

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

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "InputCore",
                "UnrealEd",
                "AssetTools",
                "Slate",
                "SlateCore",
                "RawMesh",
                "MessageLog",
                "MainFrame",
                "PropertyEditor",
                "RHI",
                "RenderCore",
                "ContentBrowser",
            }
                );

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

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
                "AssetRegistry",
            }
                );
        }
예제 #13
0
    public PhysX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (Target.bCompileAPEX)
            {
                string[] StaticLibrariesApexLinux = new string[] {
                    "NvParameterized{0}",
                    "RenderDebug{0}"
                };

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            foreach (string Lib in StaticLibrariesSwitch)
            {
                PublicAdditionalLibraries.Add(Lib + LibrarySuffix);
            }
        }
    }
예제 #14
0
    public CEF3(ReadOnlyTargetRules Target) : base(Target)
    {
        /** Mark the current version of the library */
        string CEFVersion  = "3.3071.1611.g4a19305";
        string CEFPlatform = "";

        Type = ModuleType.External;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            CEFPlatform = "windows64";
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            CEFPlatform = "windows32";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            CEFPlatform = "macosx64";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            CEFVersion  = "3.2623.1395.g3034273";
            CEFPlatform = "linux64";
        }

        if (CEFPlatform.Length > 0 && Target.bCompileCEF3)
        {
            string PlatformPath = Path.Combine(Target.UEThirdPartySourceDirectory, "CEF3", "cef_binary_" + CEFVersion + "_" + CEFPlatform);

            PublicSystemIncludePaths.Add(PlatformPath);

            string LibraryPath = Path.Combine(PlatformPath, "Release");
            string RuntimePath = Path.Combine(Target.UEThirdPartyBinariesDirectory, "CEF3", Target.Platform.ToString());

            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add("libcef.lib");

                // There are different versions of the C++ wrapper lib depending on the version of VS we're using
                string VSVersionFolderName = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
                string WrapperLibraryPath  = Path.Combine(PlatformPath, VSVersionFolderName, "libcef_dll");

                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    WrapperLibraryPath += "/Debug";
                }
                else
                {
                    WrapperLibraryPath += "/Release";
                }

                PublicLibraryPaths.Add(WrapperLibraryPath);
                PublicAdditionalLibraries.Add("libcef_dll_wrapper.lib");

                List <string> Dlls = new List <string>();

                Dlls.Add("chrome_elf.dll");
                Dlls.Add("d3dcompiler_43.dll");
                Dlls.Add("d3dcompiler_47.dll");
                Dlls.Add("libcef.dll");
                Dlls.Add("libEGL.dll");
                Dlls.Add("libGLESv2.dll");

                PublicDelayLoadDLLs.AddRange(Dlls);

                // Add the runtime dlls to the build receipt
                foreach (string Dll in Dlls)
                {
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/" + Dll));
                }
                // We also need the icu translations table required by CEF
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat"));

                // Add the V8 binary data files as well
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/snapshot_blob.bin"));

                // And the entire Resources folder. Enumerate the entire directory instead of mentioning each file manually here.
                foreach (string FileName in Directory.EnumerateFiles(Path.Combine(RuntimePath, "Resources"), "*", SearchOption.AllDirectories))
                {
                    string DependencyName = FileName.Substring(Target.UEThirdPartyBinariesDirectory.Length).Replace('\\', '/');
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/" + DependencyName));
                }
            }
            // TODO: Ensure these are filled out correctly when adding other platforms
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string WrapperPath   = LibraryPath + "/libcef_dll_wrapper.a";
                string FrameworkPath = Target.UEThirdPartyBinariesDirectory + "CEF3/Mac/Chromium Embedded Framework.framework";

                PublicAdditionalLibraries.Add(WrapperPath);
                PublicFrameworks.Add(FrameworkPath);

                if (Directory.Exists(LibraryPath + "/locale"))
                {
                    var LocaleFolders = Directory.GetFileSystemEntries(LibraryPath + "/locale", "*.lproj");
                    foreach (var FolderName in LocaleFolders)
                    {
                        AdditionalBundleResources.Add(new UEBuildBundleResource(FolderName, bInShouldLog: false));
                    }
                }

                // Add contents of framework directory as runtime dependencies
                foreach (string FilePath in Directory.EnumerateFiles(FrameworkPath, "*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FilePath));
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                // link against runtime library since this produces correct RPATH
                string RuntimeLibCEFPath = Path.Combine(RuntimePath, "libcef.so");
                PublicAdditionalLibraries.Add(RuntimeLibCEFPath);

                string Configuration;
                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    Configuration = "build_debug";
                }
                else
                {
                    Configuration = "build_release";
                }
                string WrapperLibraryPath = Path.Combine(PlatformPath, Configuration, "libcef_dll");

                PublicAdditionalLibraries.Add(Path.Combine(WrapperLibraryPath, "libcef_dll_wrapper.a"));

                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/libcef.so"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/snapshot_blob.bin"));

                // And the entire Resources folder. Enunerate the entire directory instead of mentioning each file manually here.
                foreach (string FileName in Directory.EnumerateFiles(Path.Combine(RuntimePath, "Resources"), "*", SearchOption.AllDirectories))
                {
                    string DependencyName = FileName.Substring(Target.UEThirdPartyBinariesDirectory.Length).Replace('\\', '/');
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/" + DependencyName));
                }
            }
        }
    }
예제 #15
0
    public UEOgg(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string OggPath = Target.UEThirdPartySourceDirectory + "Ogg/libogg-1.2.2/";

        PublicSystemIncludePaths.Add(OggPath + "include");

        string OggLibPath = OggPath + "lib/";

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            OggLibPath += "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(OggLibPath);

            PublicAdditionalLibraries.Add("libogg_64.lib");

            PublicDelayLoadDLLs.Add("libogg_64.dll");

            RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Ogg/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libogg_64.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            OggLibPath += "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(OggLibPath);

            PublicAdditionalLibraries.Add("libogg.lib");

            PublicDelayLoadDLLs.Add("libogg.dll");

            RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Ogg/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libogg.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.Add(OggPath + "macosx/libogg.dylib");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            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(OggLibPath + "HTML5/libogg" + OpimizationSuffix + ".bc");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // Filtered in the toolchain.
            PublicLibraryPaths.Add(OggLibPath + "Android/ARMv7");
            PublicLibraryPaths.Add(OggLibPath + "Android/ARM64");
            PublicLibraryPaths.Add(OggLibPath + "Android/x86");
            PublicLibraryPaths.Add(OggLibPath + "Android/x64");

            PublicAdditionalLibraries.Add("ogg");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                PublicAdditionalLibraries.Add(OggLibPath + "Linux/" + Target.Architecture + "/libogg.a");
            }
            else
            {
                PublicAdditionalLibraries.Add(OggLibPath + "Linux/" + Target.Architecture + "/libogg_fPIC.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(OggLibPath + "XboxOne/VS" + VersionName.ToString());
                PublicAdditionalLibraries.Add("libogg_static.lib");
            }
        }
    }
예제 #16
0
    public GoogleVR(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string GoogleVRSDKDir = Target.UEThirdPartySourceDirectory + "GoogleVR/";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            GoogleVRSDKDir + "include",
            GoogleVRSDKDir + "include/vr/gvr/capi/include",
        }
            );

        string GoogleVRBaseLibPath = GoogleVRSDKDir + "lib/";

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.Add(GoogleVRBaseLibPath + "mac/libgvr.a");
            PublicAdditionalLibraries.Add(GoogleVRBaseLibPath + "mac/libgvraux.a");
        }

        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicAdditionalLibraries.Add(GoogleVRBaseLibPath + "win32/libgvr.lib");
            PublicAdditionalLibraries.Add(GoogleVRBaseLibPath + "win32/libgvraux.lib");
        }

        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicAdditionalLibraries.Add(GoogleVRBaseLibPath + "win64/libgvr.lib");
            PublicAdditionalLibraries.Add(GoogleVRBaseLibPath + "win64/libgvraux.lib");
        }

        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string GoogleVRArmLibPath    = GoogleVRBaseLibPath + "android/armv7";
            string GoogleVRArm64LibPath  = GoogleVRBaseLibPath + "android/arm64";
            string GoogleVRx86LibPath    = GoogleVRBaseLibPath + "android/x86";
            string GoogleVRx86_64LibPath = GoogleVRBaseLibPath + "android/x86_64";

            // toolchain will filter properly
            PublicLibraryPaths.Add(GoogleVRArmLibPath);
            PublicLibraryPaths.Add(GoogleVRArm64LibPath);
            PublicLibraryPaths.Add(GoogleVRx86LibPath);
            PublicLibraryPaths.Add(GoogleVRx86_64LibPath);

            PublicAdditionalLibraries.Add("gvr");
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            string GoogleVRIOSLibPath = GoogleVRBaseLibPath + "ios/";
            PublicLibraryPaths.Add(GoogleVRIOSLibPath);

            // Libraries that the GVR SDK depend on.
            PublicAdditionalLibraries.Add(GoogleVRIOSLibPath + "libGTMSessionFetcher.a");

            // Frameworks that GoogleVR frame depends on
            PublicAdditionalFrameworks.Add(new UEBuildFramework("CoreText"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("AudioToolbox"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("AVFoundation"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("CoreGraphics"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("CoreMotion"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("CoreVideo"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("GLKit"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("MediaPlayer"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("OpenGLES"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("QuartzCore"));

            // GoogleVR framework.
            // Note: Had to add 5 times because there are 5 different resource bundles and there doesn't seem to be support for
            //       just adding resource bundles on iOS
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "GVRSDK",                                                                                           // Framework name
                    "lib/ios/ThirdPartyFrameworks/GVRSDK.embeddedframework.zip",                                        // Zip name
                    "GVRSDK.framework/Resources/GoogleKitCore.bundle"                                                   // Resources we need copied and staged
                    )
                );
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "GVRSDK",                                                                                   // Framework name
                    "lib/ios/ThirdPartyFrameworks/GVRSDK.embeddedframework.zip",                                // Zip name
                    "GVRSDK.framework/Resources/GoogleKitDialogs.bundle"                                        // Resources we need copied and staged
                    )
                );
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "GVRSDK",                                                                                           // Framework name
                    "lib/ios/ThirdPartyFrameworks/GVRSDK.embeddedframework.zip",                                        // Zip name
                    "GVRSDK.framework/Resources/CardboardSDK.bundle"                                                    // Resources we need copied and staged
                    )
                );
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "GVRSDK",                                                                                           // Framework name
                    "lib/ios/ThirdPartyFrameworks/GVRSDK.embeddedframework.zip",                                        // Zip name
                    "GVRSDK.framework/Resources/GoogleKitHUD.bundle"                                                    // Resources we need copied and staged
                    )
                );
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "GVRSDK",                                                                           // Framework name
                    "lib/ios/ThirdPartyFrameworks/GVRSDK.embeddedframework.zip",                        // Zip name
                    "GVRSDK.framework/Resources/MaterialRobotoFontLoader.bundle"                        // Resources we need copied and staged
                    )
                );
        }
    }
예제 #17
0
    public UEOpenExr(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 = Target.UEThirdPartySourceDirectory + "openexr/Deploy/lib/";
            string Platform;
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win64:
                Platform = "x64";
                LibDir  += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                break;

            case UnrealTargetPlatform.Win32:
                Platform = "Win32";
                LibDir  += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                break;

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

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

            default:
                return;
            }
            LibDir = LibDir + "/" + Platform;
            LibDir = LibDir + "/Static" + (bDebug ? "Debug" : "Release");
            PublicLibraryPaths.Add(LibDir);

            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    "Half.lib",
                    "Iex.lib",
                    "IlmImf.lib",
                    "IlmThread.lib",
                    "Imath.lib",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    LibDir + "/libHalf.a",
                    LibDir + "/libIex.a",
                    LibDir + "/libIlmImf.a",
                    LibDir + "/libIlmThread.a",
                    LibDir + "/libImath.a",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                string LibArchDir = LibDir + "/" + Target.Architecture;
                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    LibArchDir + "/libHalf.a",
                    LibArchDir + "/libIex.a",
                    LibArchDir + "/libIlmImf.a",
                    LibArchDir + "/libIlmThread.a",
                    LibArchDir + "/libImath.a",
                }
                    );
            }

            PublicSystemIncludePaths.AddRange(
                new string[] {
                Target.UEThirdPartySourceDirectory + "openexr/Deploy/include",
            }
                );
        }
    }
예제 #18
0
    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(LibraryPath);
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            if (Target.Architecture.StartsWith("x86_64"))
            {
                string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Linux/" + Target.Architecture;
                string LibraryPath      = PhysXBinariesDir + String.Format("/libAPEX_Destructible{0}.so", LibrarySuffix);
                PublicAdditionalLibraries.Add(LibraryPath);
                RuntimeDependencies.Add(LibraryPath);
            }
        }
        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);
            }
        }
    }
    public HarfBuzz(TargetInfo Target)
    {
        Type = ModuleType.External;

        // Can't be used without our dependencies
        if (!UEBuildConfiguration.bCompileFreeType || !UEBuildConfiguration.bCompileICU)
        {
            Definitions.Add("WITH_HARFBUZZ=0");
            return;
        }

        string HarfBuzzVersion  = "harfbuzz-1.2.4";
        string HarfBuzzRootPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "HarfBuzz/" + HarfBuzzVersion + "/";

        // Includes
        PublicSystemIncludePaths.Add(HarfBuzzRootPath + "src" + "/");

        string PlatformFolderName = Target.Platform.ToString();

        string HarfBuzzLibPath = HarfBuzzRootPath + PlatformFolderName + "/";

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

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            HarfBuzzLibPath += VSVersionFolderName + "/";

            string BuildTypeFolderName = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                                ? "Debug"
                                : "RelWithDebInfo";
            HarfBuzzLibPath += BuildTypeFolderName + "/";

            PublicLibraryPaths.Add(HarfBuzzLibPath);
            PublicAdditionalLibraries.Add("harfbuzz.lib");
        }

        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            string OpimizationSuffix = "_Oz";             // i.e. bCompileForSize
            if (!UEBuildConfiguration.bCompileForSize)
            {
                switch (Target.Configuration)
                {
                case UnrealTargetConfiguration.Development:
                    OpimizationSuffix = "_O2";
                    break;

                case UnrealTargetConfiguration.Shipping:
                    OpimizationSuffix = "_O3";
                    break;

                default:
                    OpimizationSuffix = "";
                    break;
                }
            }
            PublicAdditionalLibraries.Add(HarfBuzzRootPath + "HTML5/libharfbuzz" + OpimizationSuffix + ".bc");
//			PublicAdditionalLibraries.Add(HarfBuzzRootPath + "HTML5/libharfbuzz" + OpimizationSuffix + ".a");
        }

        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS)
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            PublicAdditionalLibraries.Add(HarfBuzzLibPath + "libharfbuzz.a");
        }

        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            string BuildTypeFolderName = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                                ? "Debug"
                                : "Release";
            HarfBuzzLibPath += BuildTypeFolderName + "/";

            PublicLibraryPaths.Add(HarfBuzzLibPath);
            PublicAdditionalLibraries.Add("harfbuzz");             // Automatically transforms to libharfbuzz.a
        }

        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            string BuildTypeFolderName = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                                ? "Debug"
                                : "Release";
            HarfBuzzLibPath += "VS2015/" + BuildTypeFolderName + "/";

            PublicLibraryPaths.Add(HarfBuzzLibPath);
            PublicAdditionalLibraries.Add("harfbuzz.lib");
        }

        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            string BuildTypeFolderName = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                                ? "Debug/"
                                : "Release/";

            PublicLibraryPaths.Add(HarfBuzzRootPath + "Android/ARMv7/" + BuildTypeFolderName);
            PublicLibraryPaths.Add(HarfBuzzRootPath + "Android/ARM64/" + BuildTypeFolderName);
            PublicLibraryPaths.Add(HarfBuzzRootPath + "Android/x86/" + BuildTypeFolderName);
            PublicLibraryPaths.Add(HarfBuzzRootPath + "Android/x64/" + BuildTypeFolderName);

            PublicAdditionalLibraries.Add("harfbuzz");
        }

        else
        {
            Definitions.Add("WITH_HARFBUZZ=0");
        }
    }
예제 #20
0
    public PRT(ReadOnlyTargetRules Target) : base(Target)
    {
        bUseRTTI          = true;
        bEnableExceptions = true;
        Type = ModuleType.External;

        AbstractPlatform Platform;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            Platform = new WindowsPlatform();
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            Platform = new MacPlatform();
        }
        else
        {
            throw new System.PlatformNotSupportedException();
        }

        string LibDir     = Path.Combine(ModuleDirectory, "lib", Platform.Name, "Release");
        string BinDir     = Path.Combine(ModuleDirectory, "bin", Platform.Name, "Release");
        string IncludeDir = Path.Combine(ModuleDirectory, "include");

        // 1. Check if prt is already available and has correct version, otherwise download from official github repo
        bool PrtInstalled = Directory.Exists(LibDir) && Directory.Exists(BinDir);

        string PrtCorePath     = Path.Combine(BinDir, PrtCoreDllName);
        bool   PrtCoreExists   = File.Exists(PrtCorePath);
        bool   PrtVersionMatch = PrtCoreExists && CheckDllVersion(PrtCorePath, PrtMajor, PrtMinor, PrtBuild);

        if (!PrtInstalled || !PrtVersionMatch)
        {
            string PrtUrl     = "https://github.com/Esri/esri-cityengine-sdk/releases/download";
            string PrtVersion = string.Format("{0}.{1}.{2}", PrtMajor, PrtMinor, PrtBuild);

            string PrtLibName     = string.Format("esri_ce_sdk-{0}-{1}", PrtVersion, Platform.PrtPlatform);
            string PrtLibZipFile  = PrtLibName + ".zip";
            string PrtDownloadUrl = Path.Combine(PrtUrl, PrtVersion, PrtLibZipFile);

            try
            {
                if (Directory.Exists(LibDir))
                {
                    Directory.Delete(LibDir, true);
                }
                if (Directory.Exists(BinDir))
                {
                    Directory.Delete(BinDir, true);
                }
                if (Directory.Exists(IncludeDir))
                {
                    Directory.Delete(IncludeDir, true);
                }

                if (Debug)
                {
                    if (!PrtInstalled)
                    {
                        Console.WriteLine("PRT not found");
                    }
                    Console.WriteLine("Updating PRT");
                }

                if (Debug)
                {
                    System.Console.WriteLine("Downloading " + PrtDownloadUrl + "...");
                }

                using (var Client = new WebClient())
                {
                    Client.DownloadFile(PrtDownloadUrl, Path.Combine(ModuleDirectory, PrtLibZipFile));
                }

                if (Debug)
                {
                    System.Console.WriteLine("Extracting " + PrtLibZipFile + "...");
                }

                Platform.ZipExtractor.Unzip(ModuleDirectory, PrtLibZipFile, PrtLibName);

                Directory.CreateDirectory(LibDir);
                Directory.CreateDirectory(BinDir);
                Copy(Path.Combine(ModuleDirectory, PrtLibName, "lib"), Path.Combine(ModuleDirectory, LibDir));
                Copy(Path.Combine(ModuleDirectory, PrtLibName, "bin"), Path.Combine(ModuleDirectory, BinDir));
                Copy(Path.Combine(ModuleDirectory, PrtLibName, "include"), Path.Combine(ModuleDirectory, "include"));
            }
            finally
            {
                Directory.Delete(Path.Combine(ModuleDirectory, PrtLibName), true);
                File.Delete(Path.Combine(ModuleDirectory, PrtLibZipFile));
            }
        }
        else if (Debug)
        {
            Console.WriteLine("PRT found");
        }

        // 2. Copy libraries to module binaries directory and add dependencies
        string ModuleBinariesDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../..", "Binaries", Platform.Name));

        if (Debug)
        {
            System.Console.WriteLine("PRT Source Lib Dir: " + LibDir);
            System.Console.WriteLine("PRT Source Bin Dir: " + BinDir);
            System.Console.WriteLine("PRT Source Include Dir: " + IncludeDir);
            System.Console.WriteLine("Module Binaries Dir: " + ModuleBinariesDir);
        }

        Directory.CreateDirectory(ModuleBinariesDir);
        PublicRuntimeLibraryPaths.Add(ModuleBinariesDir);

        // Copy PRT core libraries
        if (Debug)
        {
            Console.WriteLine("Adding PRT core libraries");
        }
        foreach (string FilePath in Directory.GetFiles(BinDir))
        {
            string LibraryName = Path.GetFileName(FilePath);

            Platform.AddPrtCoreLibrary(FilePath, LibraryName, this);
        }

        // Delete unused PRT extension libraries
        if (Debug)
        {
            Console.WriteLine("Deleting unused PRT extension libraries");
        }
        foreach (string FilePath in Directory.GetFiles(LibDir))
        {
            string FileName = Path.GetFileName(FilePath);
            if (Path.GetExtension(FilePath) == Platform.DynamicLibExtension)
            {
                if (!Array.Exists(ExtensionLibraries, e => e == Path.GetFileName(FilePath)))
                {
                    File.Delete(FilePath);
                }
                else
                {
                    RuntimeDependencies.Add(FilePath);
                    PublicDelayLoadDLLs.Add(FileName);
                }
            }
        }

        // Delete all sub directories from the extensions
        foreach (string DirectoryPath in Directory.GetDirectories(LibDir))
        {
            Directory.Delete(DirectoryPath, true);
        }

        // Add include search path
        if (Debug)
        {
            Console.WriteLine("Adding include search path " + IncludeDir);
        }
        PublicSystemIncludePaths.Add(IncludeDir);
    }
예제 #21
0
    public HarfBuzz(TargetInfo Target)
    {
        Type = ModuleType.External;

        // Can't be used without our dependencies
        if (!UEBuildConfiguration.bCompileFreeType || !UEBuildConfiguration.bCompileICU)
        {
            Definitions.Add("WITH_HARFBUZZ=0");
            return;
        }

        string HarfBuzzVersion  = "harfbuzz-1.0.5";
        string HarfBuzzRootPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "HarfBuzz/" + HarfBuzzVersion + "/";

        // Includes
        PublicSystemIncludePaths.Add(HarfBuzzRootPath + "src" + "/");

        string PlatformFolderName = Target.Platform.ToString();

        string HarfBuzzLibPath = HarfBuzzRootPath + PlatformFolderName + "/";

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

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            HarfBuzzLibPath += VSVersionFolderName + "/";

            string BuildTypeFolderName = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                                ? "Debug"
                                : "RelWithDebInfo";
            HarfBuzzLibPath += BuildTypeFolderName + "/";

            PublicLibraryPaths.Add(HarfBuzzLibPath);
            PublicAdditionalLibraries.Add("harfbuzz.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            PublicAdditionalLibraries.Add(HarfBuzzLibPath + "libharfbuzz.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            Definitions.Add("WITH_HARFBUZZ=1");

            string BuildTypeFolderName = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                                ? "Debug"
                                : "Release";
            HarfBuzzLibPath += BuildTypeFolderName + "/";

            PublicLibraryPaths.Add(HarfBuzzLibPath);
            PublicAdditionalLibraries.Add("harfbuzz");             // Automatically transforms to libharfbuzz.a
        }
        else
        {
            Definitions.Add("WITH_HARFBUZZ=0");
        }
    }
예제 #22
0
    public Noesis(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

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

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

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

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

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

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

        string NoesisSdkVersionInfo;

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

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

        PublicSystemIncludePaths.Add(NoesisIncludePath);

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

            string BaseTargetPath = "";
            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                if (Target.ProjectFile != null)
                {
                    BaseTargetPath = DirectoryReference.FromFile(Target.ProjectFile).ToString();
                }
            }
            else
            {
                BaseTargetPath = Target.RelativeEnginePath;
            }

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

            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                RuntimeDependencies.Add("$(ProjectDir)" + NoesisDllTargetPath);
            }
            else
            {
                RuntimeDependencies.Add("$(EngineDir)" + NoesisDllTargetPath);
            }

            if (BaseTargetPath != "")
            {
                try
                {
                    if (!System.IO.Directory.Exists(BaseTargetPath + "/Binaries/Win64"))
                    {
                        System.IO.Directory.CreateDirectory(BaseTargetPath + "/Binaries/Win64");
                    }
                    System.IO.File.Copy(ModuleDirectory + NoesisDllPath, BaseTargetPath + NoesisDllTargetPath, true);
                }
                catch (IOException Exception)
                {
                    if (Exception.HResult != -2147024864)                     // 0x80070020: The process cannot access the file ... because it is being used by another process.
                    {
                        throw;
                    }
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/osx/";
            PublicLibraryPaths.Add(NoesisLibPath);
            PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.dylib");

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

            if (Target.Version.MinorVersion <= 21)
            {
                PublicAdditionalShadowFiles.Add(Path.Combine(NoesisLibPath, "libNoesis.a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/android_arm/";
            PublicLibraryPaths.Add(NoesisLibPath);
            string NoesisLib64Path = NoesisBasePath + "Bin/android_arm64/";
            PublicLibraryPaths.Add(NoesisLib64Path);
            PublicAdditionalLibraries.Add("Noesis");

            string NoesisAplPath = "/Noesis_APL.xml";
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", ModuleDirectory + NoesisAplPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            string NoesisLibPath = NoesisBasePath + "Lib/ps4/";
            PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/xbox_one/";
            PublicLibraryPaths.Add(NoesisLibPath);
            PublicAdditionalLibraries.Add("Noesis.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            string NoesisLibPath = NoesisBasePath + "Bin/wasm/";
            PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.bc");
        }
    }
예제 #23
0
파일: V8.Build.cs 프로젝트: gamemake/tsu
    public V8(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        var ModulePath          = UnrealBuildTool.RulesCompiler.GetFileNameFromType(GetType());
        var ModuleBaseDirectory = Path.GetDirectoryName(ModulePath);

        var DLLPrefix     = "lib";
        var DLLSuffix     = ".so";
        var LibPrefix     = "lib";
        var LibSuffix     = ".a";
        var IsWindows     = false;
        var IsDynamic     = true;
        var IsDebug       = false;
        var Configuration = "Release";
        var LibraryBase   = Target.Platform.ToString();

        switch (Target.Configuration)
        {
        case UnrealTargetConfiguration.Debug:
            IsDynamic     = true;
            IsDebug       = true;
            Configuration = "Release";
            break;

        case UnrealTargetConfiguration.DebugGame:
            IsDynamic     = true;
            IsDebug       = true;
            Configuration = "Release";
            break;

        case UnrealTargetConfiguration.Development:
            IsDynamic     = true;
            Configuration = "Release";
            break;

        case UnrealTargetConfiguration.Shipping:
            IsDynamic     = false;
            Configuration = "Shipping";
            break;

        case UnrealTargetConfiguration.Test:
            IsDynamic     = false;
            Configuration = "Shipping";
            break;
        }

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            DLLPrefix = "";
            DLLSuffix = ".dll";
            LibPrefix = "";
            LibSuffix = ".lib";
            IsWindows = true;
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            DLLSuffix = ".dylib";
            if (Configuration == "Release")
            {
                IsDynamic     = false;
                Configuration = "Shipping";
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            DLLSuffix = ".dylib";
            IsDynamic = false;
            if (Configuration == "Shipping")
            {
                Configuration = "Release";
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            LibraryBase = Path.Combine(
                "Android",
                Target.Architecture
                );
        }

        if (IsDynamic)
        {
            PublicDefinitions.AddRange(new string[] {
                // "USING_V8_SHARED",
                "TSU_DLL_DELAY_LOAD",
                "V8_DEPRECATION_WARNINGS",
                "V8_IMMINENT_DEPRECATION_WARNINGS"
            });
        }
        else
        {
            PublicDefinitions.AddRange(new string[] {
                "V8_DEPRECATION_WARNINGS",
                "V8_IMMINENT_DEPRECATION_WARNINGS"
            });
        }

        var IncludeDirectory = Path.Combine(ModuleBaseDirectory, "Include");

        PublicSystemIncludePaths.Add(IncludeDirectory);

        var LibraryDirectory = Path.Combine(
            ModuleBaseDirectory,
            "Lib",
            LibraryBase,
            Configuration
            );

        if (IsDynamic)
        {
            var DLLs = new string[]
            {
                "v8",
                "v8_libbase",
                "v8_libplatform"
            };

            if (IsWindows)
            {
                PublicLibraryPaths.Add(LibraryDirectory);
                foreach (var DLL in DLLs)
                {
                    var LibName = string.Format("{0}{1}.dll{2}", LibPrefix, DLL, LibSuffix);
                    PublicAdditionalLibraries.Add(LibName);
                    var DLLName = string.Format("{0}{1}{2}", DLLPrefix, DLL, DLLSuffix);
                    PublicDelayLoadDLLs.Add(DLLName);
                }
                // PrivateDefinitions.Add("TSU_DLL_DELAY_LOAD");
            }
            else
            {
                foreach (var DLL in DLLs)
                {
                    var DLLName = string.Format("{0}{1}{2}", DLLPrefix, DLL, DLLSuffix);
                    PublicDelayLoadDLLs.Add(Path.Combine(LibraryDirectory, DLLName));
                }
            }
        }
        else
        {
            PublicAdditionalLibraries.Add(Path.Combine(
                                              LibraryDirectory,
                                              LibPrefix + "v8_monolith" + LibSuffix
                                              ));
        }
    }
        public AxFImporter(ReadOnlyTargetRules Target) : base(Target)
        {
            bLegalToDistributeObjectCode = true;

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Analytics",
                "Core",
                "RenderCore",
                "ImageCore",
                "CoreUObject",
                "Engine",
                "MessageLog",
                "UnrealEd",
                "Slate",
                "SlateCore",
                "Mainframe",
                "InputCore",
                "EditorStyle",
                "MaterialEditor",
                "Projects"
            }
                );

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

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicDelayLoadDLLs.Add("AxFDecoding.dll");
                string ModulePath = Path.Combine(EngineDirectory, "Plugins/Enterprise/AxFImporter/Binaries/ThirdParty/AxF", Target.Platform.ToString(), "AxFDecoding.dll");
                if (!File.Exists(ModulePath))
                {
                    string Err = string.Format("AxF Decoding dll '{0}' not found.", ModulePath);
                    System.Console.WriteLine(Err);
                    throw new BuildException(Err);
                }
                RuntimeDependencies.Add(ModulePath);
            }


            if (Directory.Exists(ThirdPartyPath))
            {
                //third party libraries

                string[] Libs           = { "AxF-Decoding-SDK-1.5.1" };
                string[] StaticLibNames = { "AxFDecoding" };

                foreach (string Lib in Libs)
                {
                    string IncludePath = Path.Combine(ThirdPartyPath, Lib, "include");
                    if (Directory.Exists(IncludePath))
                    {
                        PublicSystemIncludePaths.Add(IncludePath);
                    }
                    else
                    {
                        return;
                    }
                }

                PrivateDefinitions.Add("USE_AXFSDK");

                string TargetPlatform  = "Windows.x64";
                string TargetExtension = "lib";
                if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
                {
                    PublicDefinitions.Add("MI_PLATFORM_WINDOWS");
                }
                else if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    TargetPlatform  = "Linux.x64";
                    TargetExtension = "so";
                }
                else if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    TargetPlatform  = "MacOSX.x64";
                    TargetExtension = "dylib";
                }

                // add static libraries
                for (int i = 0; i < Libs.Length; ++i)
                {
                    string LibName = StaticLibNames[i];
                    if (LibName == "")
                    {
                        continue;
                    }

                    LibName += "." + TargetExtension;

                    string LibPath = Path.Combine(ThirdPartyPath, Libs[i], TargetPlatform, "lib", LibName);
                    PublicAdditionalLibraries.Add(LibPath);
                }
            }
        }
예제 #25
0
        public GoogleTest(ReadOnlyTargetRules Target) : base(Target)
        {
            Type = ModuleType.External;

            string googleTestBasePath = Path.Combine(ModuleDirectory, "googletest-release-1.10.0");

            PublicSystemIncludePaths.Add(Path.Combine(googleTestBasePath, "googlemock"));
            PublicSystemIncludePaths.Add(Path.Combine(googleTestBasePath, "googlemock", "include"));
            PublicSystemIncludePaths.Add(Path.Combine(googleTestBasePath, "googletest"));
            PublicSystemIncludePaths.Add(Path.Combine(googleTestBasePath, "googletest", "include"));

            PublicDefinitions.Add("GTEST_OS_WINDOWS=1");
            PublicDefinitions.Add("GTEST_OS_WINDOWS_MOBILE=0");
            PublicDefinitions.Add("GTEST_OS_LINUX_ANDROID=0");
            PublicDefinitions.Add("GTEST_OS_LINUX=0");
            PublicDefinitions.Add("GTEST_OS_MAC=0");
            PublicDefinitions.Add("GTEST_OS_HPUX=0");
            PublicDefinitions.Add("GTEST_OS_QNX=0");
            PublicDefinitions.Add("GTEST_OS_FREEBSD=0");
            PublicDefinitions.Add("GTEST_OS_NACL=0");
            PublicDefinitions.Add("GTEST_OS_NETBSD=0");
            PublicDefinitions.Add("GTEST_OS_FUCHSIA=0");
            PublicDefinitions.Add("GTEST_OS_LINUX_ANDROID=0");
            PublicDefinitions.Add("GTEST_OS_SYMBIAN=0");
            PublicDefinitions.Add("GTEST_OS_WINDOWS_MINGW=0");
            PublicDefinitions.Add("GTEST_OS_WINDOWS_PHONE=0");
            PublicDefinitions.Add("GTEST_OS_WINDOWS_RT=0");
            PublicDefinitions.Add("GTEST_OS_CYGWIN=0");
            PublicDefinitions.Add("GTEST_OS_SOLARIS=0");
            PublicDefinitions.Add("GTEST_OS_WINDOWS_TV_TITLE=0");
            PublicDefinitions.Add("GTEST_OS_IOS=0");
            PublicDefinitions.Add("GTEST_OS_AIX=0");
            PublicDefinitions.Add("GTEST_OS_ZOS=0");

            PublicDefinitions.Add("GTEST_DONT_DEFINE_FAIL=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_SUCCEED=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_ASSERT_EQ=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_ASSERT_NE=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_ASSERT_LE=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_ASSERT_LT=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_ASSERT_GE=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_ASSERT_GT=0");
            PublicDefinitions.Add("GTEST_DONT_DEFINE_TEST=0");

            PublicDefinitions.Add("GTEST_HAS_DOWNCAST_=0");
            PublicDefinitions.Add("GTEST_HAS_MUTEX_AND_THREAD_LOCAL_=0");
            PublicDefinitions.Add("GTEST_HAS_NOTIFICATION_=0");
            PublicDefinitions.Add("GTEST_HAS_ABSL=0");
            PublicDefinitions.Add("GTEST_HAS_GETTIMEOFDAY_=0");

            PublicDefinitions.Add("__GXX_EXPERIMENTAL_CXX0X__=0");
            PublicDefinitions.Add("GTEST_USES_PCRE=0");
            PublicDefinitions.Add("GTEST_USES_POSIX_RE=0");
            PublicDefinitions.Add("GTEST_ENV_HAS_TR1_TUPLE_=0");
            PublicDefinitions.Add("GTEST_LINKED_AS_SHARED_LIBRARY=0");
            PublicDefinitions.Add("GTEST_CREATE_SHARED_LIBRARY=0");
            PublicDefinitions.Add("GTEST_CAN_STREAM_RESULTS_=0");
            PublicDefinitions.Add("GTEST_FOR_GOOGLE_=0");
            PublicDefinitions.Add("GTEST_GCC_VER_=0");

            PublicDefinitions.Add("WIN32_LEAN_AND_MEAN=1");
        }
    public QTMConnectLiveLink(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

        string rtClientSDKPath          = Path.GetFullPath(Path.Combine(PluginDirectory, "Source/ThirdParty/RTClientSDK"));
        string rtClientSDKIncludePath   = System.IO.Path.Combine(rtClientSDKPath, "Include");
        string targetPlatformPathName   = GetTargetPlatformPathName(Target);
        string rtClientSDKLibPath       = Path.Combine(rtClientSDKPath, "Lib", targetPlatformPathName);
        string pluginPublicIncludePath  = Path.Combine(ModuleDirectory, "Public");
        string pluginPrivateIncludePath = Path.Combine(ModuleDirectory, "Private");

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


        PrivateIncludePaths.AddRange(
            new string[] {
            pluginPrivateIncludePath,
            rtClientSDKIncludePath,
        }
            );


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Networking",
            "Sockets",
            "LiveLinkInterface",
            "LiveLink",
#if UE_5_0_OR_LATER
            "LiveLinkAnimationCore",
#endif
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "LiveLink",
            "LiveLinkInterface",
            "TimeManagement",
#if UE_5_0_OR_LATER
            "LiveLinkAnimationCore",
#endif
        }
            );


        PublicSystemIncludePaths.Add(rtClientSDKIncludePath);

        if (IsWindowsPlatform(Target))
        {
            PublicAdditionalLibraries.Add(Path.Combine(rtClientSDKLibPath, "RTClientSDK.lib"));
        }
    }
예제 #27
0
    public APEX(TargetInfo Target)
    {
        Type = ModuleType.External;

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

        Definitions.Add("WITH_APEX=1");

        string APEXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/APEX-1.3/";

        string APEXLibDir = APEXDir + "lib";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            APEXDir + "public",
            APEXDir + "framework/public",
            APEXDir + "framework/public/PhysX3",
            APEXDir + "module/destructible/public",
            APEXDir + "module/clothing/public",
            APEXDir + "module/legacy/public",
            APEXDir + "NxParameterized/public",
        }
            );

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

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

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

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

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

            string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/APEX-1.3/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string RuntimeDependency in RuntimeDependenciesX64)
            {
                RuntimeDependencies.Add(new RuntimeDependency(ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix)));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            APEXLibDir += "/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(APEXLibDir);

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

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

            string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/APEX-1.3/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string RuntimeDependency in RuntimeDependenciesX86)
            {
                RuntimeDependencies.Add(new RuntimeDependency(ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix)));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            APEXLibDir += "/osx64";
            Definitions.Add("APEX_STATICALLY_LINKED=1");

            ApexLibraries.Add("APEX_Legacy{0}");

            LibraryFormatString = APEXLibDir + "/lib{0}" + ".a";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            APEXLibDir += "/Linux/" + Target.Architecture;
            Definitions.Add("APEX_STATICALLY_LINKED=1");

            ApexLibraries.Add("APEX_Legacy{0}");

            LibraryFormatString = APEXLibDir + "/lib{0}" + ".a";
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            Definitions.Add("APEX_STATICALLY_LINKED=1");
            Definitions.Add("WITH_APEX_LEGACY=0");

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

            LibraryFormatString = "{0}";
        }
        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)
            {
                Definitions.Add("APEX_STATICALLY_LINKED=1");
                Definitions.Add("WITH_APEX_LEGACY=0");

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

                System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                APEXLibDir += "/XboxOne/VS" + VersionName.ToString();
                PublicLibraryPaths.Add(APEXLibDir);

                LibraryFormatString = "{0}.lib";
            }
        }

        // Add the libraries needed (used for all platforms except Windows)
        if (LibraryFormatString != null)
        {
            foreach (string Lib in ApexLibraries)
            {
                string ConfiguredLib = String.Format(Lib, LibrarySuffix);
                string FinalLib      = String.Format(LibraryFormatString, ConfiguredLib);
                PublicAdditionalLibraries.Add(FinalLib);
            }
        }
    }
예제 #28
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
                Definitions.Add("FBXSDK_SHARED");

                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Win64/libfbxsdk.dll"));
            }
            else
            {
                if (Target.bUseStaticCRT)
                {
                    PublicAdditionalLibraries.Add("libfbxsdk-mt.lib");
                }
                else
                {
                    PublicAdditionalLibraries.Add("libfbxsdk-md.lib");
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string LibDir = FBXSDKDir + "lib/clang/release/";
            PublicAdditionalLibraries.Add(LibDir + "libfbxsdk.dylib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            string LibDir = FBXSDKDir + "lib/gcc4/" + Target.Architecture + "/release/";
            if (!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 */
            Definitions.Add("FBXSDK_COMPILER_CLANG");

            // libfbxsdk has been built against libstdc++ and as such needs this library
            PublicAdditionalLibraries.Add("stdc++");
        }
    }
예제 #29
0
    public GlsLang(TargetInfo Target)
    {
        Type = ModuleType.External;

        PublicSystemIncludePaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "glslang/glslang/src/glslang_lib");

        string LibPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "glslang/glslang/lib/";

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            LibPath = LibPath + (Target.Platform == UnrealTargetPlatform.Win32 ? "Win32/" : "Win64/");
            LibPath = LibPath + "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();

            PublicLibraryPaths.Add(LibPath);

            if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PublicAdditionalLibraries.Add("glslangd_64.lib");
                }
                else if (Target.Platform == UnrealTargetPlatform.Win32)
                {
                    PublicAdditionalLibraries.Add("glslangd.lib");
                }
            }
            else
            {
                if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PublicAdditionalLibraries.Add("glslang_64.lib");
                }
                else if (Target.Platform == UnrealTargetPlatform.Win32)
                {
                    PublicAdditionalLibraries.Add("glslang.lib");
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                PublicAdditionalLibraries.Add(LibPath + "Mac/libglslangd.a");
            }
            else
            {
                PublicAdditionalLibraries.Add(LibPath + "Mac/libglslang.a");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicAdditionalLibraries.Add(LibPath + "Linux/" + Target.Architecture + "/libglslang.a");
        }
        else
        {
            string Err = string.Format("Attempt to build against GlsLang on unsupported platform {0}", Target.Platform);
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }
    }
예제 #30
0
    public ICU(TargetInfo Target)
    {
        Type = ModuleType.External;

        bool bNeedsDlls = false;

        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") // simulator
        {
            TargetSpecificPath = ICURootPath + "Win32/";
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") // simulator
            )
        {
            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));
                    }
                }

                bNeedsDlls = true;

                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
            // Temporarily? only link statically on Linux too
            //EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic;
            EICULinkType ICULinkType = EICULinkType.Static;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix;
                    if (Target.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 || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            string StaticLibraryExtension  = "a";
            string DynamicLibraryExtension = "dylib";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && 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);
                    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);
                        RuntimeDependencies.Add(new RuntimeDependency(LibraryPath));
                    }
                }

                bNeedsDlls = true;

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

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

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

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

        Definitions.Add("NEEDS_ICU_DLLS=" + (bNeedsDlls ? "1" : "0"));
    }