Exemplo n.º 1
0
    public OpenVR(ReadOnlyTargetRules Target) : base(Target)
    {
        /** Mark the current version of the OpenVR SDK */
        string OpenVRVersion = "v1_0_16";

        Type = ModuleType.External;

        string SdkBase = Target.UEThirdPartySourceDirectory + "OpenVR/OpenVR" + OpenVRVersion;

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

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

        string LibraryPath = SdkBase + "/lib/";

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

            string OpenVRBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/OpenVR/OpenVR{0}/Win32/", OpenVRVersion);
            RuntimeDependencies.Add(OpenVRBinariesDir + "openvr_api.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(LibraryPath + "win64");
            PublicAdditionalLibraries.Add("openvr_api.lib");
            PublicDelayLoadDLLs.Add("openvr_api.dll");

            string OpenVRBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/OpenVR/OpenVR{0}/Win64/", OpenVRVersion);
            RuntimeDependencies.Add(OpenVRBinariesDir + "openvr_api.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string DylibPath = Target.UEThirdPartyBinariesDirectory + "OpenVR/OpenVR" + OpenVRVersion + "/osx32/libopenvr_api.dylib";
            PublicDelayLoadDLLs.Add(DylibPath);
            PublicAdditionalShadowFiles.Add(DylibPath);
            RuntimeDependencies.Add(DylibPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture.StartsWith("x86_64"))
        {
            PublicLibraryPaths.Add(LibraryPath + "linux64");
            PublicAdditionalLibraries.Add("openvr_api");

            string DylibDir = Target.UEThirdPartyBinariesDirectory + "OpenVR/OpenVR" + OpenVRVersion + "/linux64";
            PrivateRuntimeLibraryPaths.Add(DylibDir);

            string DylibPath = DylibDir + "/libopenvr_api.so";
            PublicDelayLoadDLLs.Add(DylibPath);
            RuntimeDependencies.Add(DylibPath);
        }
    }
Exemplo n.º 2
0
    public nvTextureTools(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string nvttPath = Target.UEThirdPartySourceDirectory + "nvTextureTools/nvTextureTools-2.0.8/";

        string nvttLibPath = nvttPath + "lib";

        PublicIncludePaths.Add(nvttPath + "src/src");

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

            PublicAdditionalLibraries.Add("nvtt_64.lib");

            PublicDelayLoadDLLs.Add("nvtt_64.dll");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/nvTextureTools/Win64/nvtt_64.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            nvttLibPath += ("/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
            PublicLibraryPaths.Add(nvttLibPath);

            PublicAdditionalLibraries.Add("nvtt.lib");

            PublicDelayLoadDLLs.Add("nvtt.dll");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/nvTextureTools/Win32/nvtt.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.Add(nvttPath + "lib/Mac/libnvcore.dylib");
            PublicAdditionalLibraries.Add(nvttPath + "lib/Mac/libnvimage.dylib");
            PublicAdditionalLibraries.Add(nvttPath + "lib/Mac/libnvmath.dylib");
            PublicAdditionalLibraries.Add(nvttPath + "lib/Mac/libnvtt.dylib");
            PublicAdditionalLibraries.Add(nvttPath + "lib/Mac/libsquish.a");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            string NvBinariesDir = Target.UEThirdPartyBinariesDirectory + "nvTextureTools/Linux/" + Target.Architecture;
            PrivateRuntimeLibraryPaths.Add(NvBinariesDir);

            PublicAdditionalLibraries.Add(NvBinariesDir + "/libnvcore.so");
            PublicAdditionalLibraries.Add(NvBinariesDir + "/libnvimage.so");
            PublicAdditionalLibraries.Add(NvBinariesDir + "/libnvmath.so");
            PublicAdditionalLibraries.Add(NvBinariesDir + "/libnvtt.so");

            RuntimeDependencies.Add(NvBinariesDir + "/libnvcore.so");
            RuntimeDependencies.Add(NvBinariesDir + "/libnvimage.so");
            RuntimeDependencies.Add(NvBinariesDir + "/libnvmath.so");
            RuntimeDependencies.Add(NvBinariesDir + "/libnvtt.so");
        }
    }
        public USDImporter(ReadOnlyTargetRules Target) : base(Target)
        {
            bUseRTTI = true;

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "JsonUtilities",
                "UnrealEd",
                "InputCore",
                "SlateCore",
                "PropertyEditor",
                "Slate",
                "EditorStyle",
                "RawMesh",
                "GeometryCache",
                "MeshDescription",
                "MeshDescriptionOperations",
                "MeshUtilities",
                "MessageLog",
                "PythonScriptPlugin",
                "RenderCore",
                "RHI",
                "StaticMeshDescription",
                "USDUtilities",
            }
                );

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PrivateDependencyModuleNames.Add("UnrealUSDWrapper");

                foreach (string FilePath in Directory.EnumerateFiles(Path.Combine(ModuleDirectory, "../../Binaries/Win64/"), "*.dll", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture.StartsWith("x86_64"))
            {
                PrivateDependencyModuleNames.Add("UnrealUSDWrapper");

                // link directly to runtime libs on Linux, as this also puts them into rpath
                string RuntimeLibraryPath = Path.Combine(ModuleDirectory, "../../Binaries", Target.Platform.ToString(), Target.Architecture.ToString());
                PrivateRuntimeLibraryPaths.Add(RuntimeLibraryPath);

                foreach (string FilePath in Directory.EnumerateFiles(RuntimeLibraryPath, "*.so*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }
            }
        }
Exemplo n.º 4
0
    public QualcommTextureConverter(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.Mac) ||
            (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture.StartsWith("x86_64")))
        {
            PublicIncludePaths.Add(Target.UEThirdPartySourceDirectory + "Qualcomm/TextureConverter/Include");

            string LibraryPath      = Target.UEThirdPartySourceDirectory + "Qualcomm/TextureConverter/Lib/";
            string LibraryName      = "TextureConverter";
            string LibraryExtension = ".lib";

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                LibraryPath += "vs" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/x64";
                PublicDelayLoadDLLs.Add("TextureConverter.dll");

                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Qualcomm/Win64/TextureConverter.dll");
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string DylibPath = Target.UEThirdPartyBinariesDirectory + "Qualcomm/Mac/libTextureConverter.dylib";
                PublicDelayLoadDLLs.Add(DylibPath);
                RuntimeDependencies.Add(DylibPath);
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                LibraryPath     += "linux_x64";                 // FIXME: change to proper architecture
                LibraryExtension = ".so";
                LibraryName      = LibraryPath + "/lib" + LibraryName;

                PrivateRuntimeLibraryPaths.Add("$(EngineDir)/Binaries/ThirdParty/Qualcomm/Linux");
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Qualcomm/Linux/libTextureConverter.so");
            }

            if (Target.Platform != UnrealTargetPlatform.Mac)
            {
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add(LibraryName + LibraryExtension);
            }
        }
    }
Exemplo n.º 5
0
    public IntelISPCTexComp(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string LibraryPath  = Target.UEThirdPartySourceDirectory + "IntelISPCTexComp/ispc_texcomp/";
        string BinaryFolder = Target.UEThirdPartyBinariesDirectory + "IntelISPCTexComp/";

        PublicIncludePaths.Add(LibraryPath);

        //NOTE: If you change bUseDebugBuild, you must also change FTextureFormatIntelISPCTexCompModule.GetTextureFormat() to load the corresponding DLL
        bool bUseDebugBuild = false;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string platformName = (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64" : "Win32";
            string configName   = bUseDebugBuild ? "Debug" : "Release";
            string LibFolder    = LibraryPath + "lib/" + platformName + "-" + configName;
            string DLLFolder    = BinaryFolder + platformName + "-" + configName;
            string DLLFilePath  = DLLFolder + "/ispc_texcomp.dll";
            PublicLibraryPaths.Add(LibFolder);
            PublicLibraryPaths.Add(DLLFolder);
            PublicAdditionalLibraries.Add("ispc_texcomp.lib");
            PublicDelayLoadDLLs.Add("ispc_texcomp.dll");
            RuntimeDependencies.Add(DLLFilePath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string BinaryLibraryFolder = BinaryFolder + "Mac64-Release";
            string LibraryFilePath     = BinaryLibraryFolder + "/libispc_texcomp.dylib";
            PublicAdditionalLibraries.Add(LibraryFilePath);
            PublicDelayLoadDLLs.Add(LibraryFilePath);
            PublicAdditionalShadowFiles.Add(LibraryFilePath);
            RuntimeDependencies.Add(LibraryFilePath);
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix) && Target.Architecture.StartsWith("x86_64"))
        {
            string BinaryLibraryFolder = BinaryFolder + "Linux64-Release";
            PrivateRuntimeLibraryPaths.Add(BinaryLibraryFolder);
            string LibraryFilePath = BinaryLibraryFolder + "/libispc_texcomp.so";
            PublicAdditionalLibraries.Add(LibraryFilePath);
            PublicDelayLoadDLLs.Add("libispc_texcomp.so");
            RuntimeDependencies.Add(LibraryFilePath);
        }
    }
Exemplo n.º 6
0
        public USDImporter(ReadOnlyTargetRules Target) : base(Target)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "JsonUtilities",
                "UnrealEd",
                "InputCore",
                "SlateCore",
                "PropertyEditor",
                "Slate",
                "EditorStyle",
                "GeometryCache",
                "MeshDescription",
                "MeshUtilities",
                "MessageLog",
                "PythonScriptPlugin",
                "StaticMeshDescription",
                "UnrealUSDWrapper",
                "USDClasses",
                "USDUtilities",
                "DeveloperSettings"
            }
                );

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

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                foreach (string FilePath in Directory.EnumerateFiles(Path.Combine(ModuleDirectory, "../../Binaries/Win64/"), "*.dll", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }

                RuntimeDependencies.Add(IntelTBBLibs + "Win64/vc14/tbb.dll");
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture.StartsWith("x86_64"))
            {
                // link directly to runtime libs on Linux, as this also puts them into rpath
                string RuntimeLibraryPath = Path.Combine(ModuleDirectory, "../../Binaries", Target.Platform.ToString(), Target.Architecture.ToString());
                PrivateRuntimeLibraryPaths.Add(RuntimeLibraryPath);

                RuntimeDependencies.Add(IntelTBBLibs + "Linux/libtbb.so");
                RuntimeDependencies.Add(IntelTBBLibs + "Linux/libtbb.so.2");
                RuntimeDependencies.Add(IntelTBBLibs + "Linux/libtbbmalloc.so");
                RuntimeDependencies.Add(IntelTBBLibs + "Linux/libtbbmalloc.so.2");

                foreach (string FilePath in Directory.EnumerateFiles(RuntimeLibraryPath, "*.so*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                foreach (string FilePath in Directory.EnumerateFiles(Path.Combine(ModuleDirectory, "../../Binaries/Mac/"), "*.dylib", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }

                RuntimeDependencies.Add(IntelTBBLibs + "Mac/libtbb.dylib");
                RuntimeDependencies.Add(IntelTBBLibs + "Mac/libtbbmalloc.dylib");
            }
        }
Exemplo n.º 7
0
    public APEX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

        string ApexVersion = "APEX_1.4";

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

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

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

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

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

        bool bIsApexStaticallyLinked = false;
        bool bHasApexLegacy          = true;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            PublicDefinitions.Add("_XBOX_ONE=1");

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

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

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

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

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

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

            LibraryFormatString = "{0}";
        }

        PublicDefinitions.Add("APEX_UE4=1");

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

        // Add the libraries needed (used for all platforms except Windows)
        if (LibraryFormatString != null)
        {
            foreach (string Lib in ApexLibraries)
            {
                string ConfiguredLib = String.Format(Lib, LibrarySuffix);
                string FinalLib      = String.Format(LibraryFormatString, ConfiguredLib);
                PublicAdditionalLibraries.Add(FinalLib);
            }
        }
    }
Exemplo n.º 8
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("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/" + Dll);
                }
                // We also need the icu translations table required by CEF
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat");

                // Add the V8 binary data files as well
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin");
                RuntimeDependencies.Add("$(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("$(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 BundleResource(FolderName, bShouldLog: false));
                    }
                }

                // Add contents of framework directory as runtime dependencies
                foreach (string FilePath in Directory.EnumerateFiles(FrameworkPath, "*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(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      = "build_release";
                string WrapperLibraryPath = Path.Combine(PlatformPath, Configuration, "libcef_dll");

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

                PrivateRuntimeLibraryPaths.Add("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString());

                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/libcef.so");
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat");
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin");
                RuntimeDependencies.Add("$(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("$(EngineDir)/Binaries/ThirdParty/" + DependencyName);
                }
            }
        }
    }
    public VAPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage          = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        bEnableExceptions = true;

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


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


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


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


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


        // Path pPath = Path.Combine(ModuleDirectory, "..", "VALibrary", "lib");
        PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "..", "VALibrary", "lib"));
        PublicRuntimeLibraryPaths.Add(Path.Combine(ModuleDirectory, "..", "VALibrary", "lib"));


        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            // Add the import library
            //PublicLibraryPaths.Add("VALibrary/lib");
            //PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "x64", "Release"));
            PublicAdditionalLibraries.Add("VABase.lib");
            PublicAdditionalLibraries.Add("VistaBase.lib");
            PublicAdditionalLibraries.Add("VistaAspects.lib");
            PublicAdditionalLibraries.Add("VistaInterProcComm.lib");
            PublicAdditionalLibraries.Add("VANet.lib");

            // Delay-load the DLL, so we can load it from the right place first
            PublicDelayLoadDLLs.Add("VABase.dll");
            PublicDelayLoadDLLs.Add("VistaBase.dll");
            PublicDelayLoadDLLs.Add("VistaAspects.dll");
            PublicDelayLoadDLLs.Add("VistaInterProcComm.dll");
            PublicDelayLoadDLLs.Add("VANet.dll");
        }
        else // if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            // PublicRuntimeLibraryPaths.Add(Path.Combine(ModuleDirectory, "..", "VALibrary", "lib"));

            // Tried PublicAdditionalLibraries("VABase.so");

            // PublicAdditionalLibraries.Add("VistaBase.so");
            // PublicAdditionalLibraries.Add("VistaAspects.so");
            // PublicAdditionalLibraries.Add("VistaInterProcComm.so");
            // PublicAdditionalLibraries.Add("VABase.so");
            // PublicAdditionalLibraries.Add("VANet.so");

            // PublicAdditionalLibraries.Add("VABase.so");
            // PublicAdditionalLibraries.Add("VistaBase.so");
            // PublicAdditionalLibraries.Add("VistaAspects.so");
            // PublicAdditionalLibraries.Add("VistaInterProcComm.so");
            // PublicAdditionalLibraries.Add("VANet.so");


            // Path.GetFullPath(Path.Combine(ModuleDirectory, actualPath))

            // run fr 3.5. 18.00
            // PublicDelayLoadDLLs.Add("VABase.so");
            // PublicDelayLoadDLLs.Add("VistaBase.so");
            // PublicDelayLoadDLLs.Add("VistaAspects.so");
            // PublicDelayLoadDLLs.Add("VistaInterProcComm.so");
            // PublicDelayLoadDLLs.Add("VANet.so");

            // PublicAdditionalLibraries.Add("VABase.so");
            // PublicAdditionalLibraries.Add("VistaBase.so");
            // PublicAdditionalLibraries.Add("VistaAspects.so");
            // PublicAdditionalLibraries.Add("VistaInterProcComm.so");
            // PublicAdditionalLibraries.Add("VANet.so");


            // PublicAdditionalLibraries.Add("VistaBase.so");
            // PublicAdditionalLibraries.Add("VistaAspects.so");
            // PublicAdditionalLibraries.Add("VistaInterProcComm.so");
            // PublicAdditionalLibraries.Add("VABase.so");
            // PublicAdditionalLibraries.Add("VANet.so");

            // from USDImporter.Build.cs (G:\Programme\UE_4.21\Engine\Plugins\Editor\USDImporter\Source\USDImporter)

            /*
             * else if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture.StartsWith("x86_64"))
             * {
             *  // link directly to runtime libs on Linux, as this also puts them into rpath
             *  string RuntimeLibraryPath = Path.Combine(ModuleDirectory, "../../Binaries", Target.Platform.ToString(), Target.Architecture.ToString());
             *  PrivateRuntimeLibraryPaths.Add(RuntimeLibraryPath);
             *  PublicAdditionalLibraries.Add(RuntimeLibraryPath + "/libUnrealUSDWrapper.so");
             *
             *  foreach (string FilePath in Directory.EnumerateFiles(RuntimeLibraryPath, "*.so*", SearchOption.AllDirectories))
             *  {
             *      RuntimeDependencies.Add(FilePath);
             *  }
             * }
             */

            // PrivateRuntimeLibraryPaths.Add(RuntimeLibraryPath);
            string RuntimeLibraryPath = Path.Combine(ModuleDirectory, "..", "VALibrary", "lib");
            PrivateRuntimeLibraryPaths.Add(RuntimeLibraryPath);
            PublicLibraryPaths.Add(RuntimeLibraryPath);

            foreach (string FilePath in Directory.EnumerateFiles(RuntimeLibraryPath, "*.so", SearchOption.AllDirectories))
            {
                PublicAdditionalLibraries.Add(FilePath);
                RuntimeDependencies.Add(FilePath);
            }
            foreach (string FilePath in Directory.EnumerateFiles(RuntimeLibraryPath, "*.so.*", SearchOption.AllDirectories))
            {
                RuntimeDependencies.Add(FilePath);
            }

            // RuntimeDependencies.Add("VistaBase.so");
            // RuntimeDependencies.Add("VistaAspects.so");
            // RuntimeDependencies.Add("VistaInterProcComm.so");
            // RuntimeDependencies.Add("VABase.so");
            // RuntimeDependencies.Add("VANet.so");
        }

        //this is needed to register on Editor delegates, i.e., BeginPIE and EndPIE, but only in Editor builds
        if (Target.Type == TargetRules.TargetType.Editor)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "UnrealEd"
            }
                );
        }
    }
Exemplo n.º 10
0
    public APEX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

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

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

        bool bIsApexStaticallyLinked = bIsApexStaticallyLinked_Default;
        bool bHasApexLegacy          = bHasApexLegacy_Default;

        string ApexLibDir = ApexLibDir_Default;

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            ApexLibDir = Path.Combine(ApexLibDir, "Win64", "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());

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

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

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

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

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

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

            ApexLibDir = Path.Combine(ApexLibDir, Target.Platform.ToString(), "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());

            PublicAdditionalLibraries.Add(Path.Combine(ApexLibDir, String.Format("APEXFramework{0}_{1}.lib", LibrarySuffix, Arch)));
            PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_{1}.dll", LibrarySuffix, Arch));


            string[] RuntimeDependenciesTempl =
            {
                "APEX_Clothing{0}_{1}.dll",
                "APEX_Legacy{0}_{1}.dll",
                "ApexFramework{0}_{1}.dll",
            };

            string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/{1}/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName(), Target.Platform.ToString());
            bHasApexLegacy = Target.Platform != UnrealTargetPlatform.HoloLens;

            foreach (string RuntimeDependency in RuntimeDependenciesTempl)
            {
                string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix, Arch);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }
            if (LibrarySuffix != "")
            {
                PublicDefinitions.Add("UE_APEX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            ApexLibraries.Clear();
            ApexLibraries.AddRange(
                new string[]
            {
                "ApexCommon{0}",
                "ApexShared{0}",
            });

            ApexLibDir          = Path.Combine(ApexLibDir, "Mac");
            LibraryFormatString = "lib{0}.a";

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

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

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

                foreach (string RuntimeDependency in DynamicLibrariesLinux)
                {
                    string LibraryPath = PhysXBinariesDir + String.Format(RuntimeDependency, LibrarySuffix);
                    PublicAdditionalLibraries.Add(LibraryPath);
                    RuntimeDependencies.Add(LibraryPath);
                    RuntimeDependencies.Add(Path.ChangeExtension(LibraryPath, ".debug"), StagedFileType.DebugNonUFS);
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            bIsApexStaticallyLinked = true;
            bHasApexLegacy          = false;

            PublicDefinitions.Add("_XBOX_ONE=1");

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

            ApexLibDir = Path.Combine(ApexLibDir, "XboxOne", "VS2015");

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

            LibraryFormatString = "{0}.lib";
        }

        PublicDefinitions.Add("APEX_UE4=1");

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

        // Add the libraries needed (used for all platforms except Windows)
        if (LibraryFormatString != null)
        {
            foreach (string Lib in ApexLibraries)
            {
                string ConfiguredLib = String.Format(Lib, LibrarySuffix);
                string FinalLib      = String.Format(LibraryFormatString, ConfiguredLib);
                PublicAdditionalLibraries.Add(Path.Combine(ApexLibDir, FinalLib));
            }
        }
    }
    public carfield_map_api(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        /* Linux平台下的链接手段*/
        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicDefinitions.Add("__NVCC__");

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


            string LibPath           = Path.Combine(ModulePath, "lib/Linux");
            var    ConvertedLibPaths = Linuxcarfield_map_apiLibsCollection.ConvertAll(m => Path.Combine(LibPath, m + ".so"));
            PublicAdditionalLibraries.AddRange(
                ConvertedLibPaths
                );
            RuntimeDependencies.Add("$(ProjectDir)/lib/Linux/libcarfield_map_api.so");
            PrivateRuntimeLibraryPaths.Add("$(ProjectDir)/lib/");


            //// 访问到模块下第三方的lib文件夹并开始第三方库链接
            //string LibPath = Path.Combine(ModulePath, "lib/Linux");
            //var ConvertedLibPaths = LinuxGrpcLibsCollection.ConvertAll(m => Path.Combine(LibPath, /*"lib" +*/ m + ".a"));
            //PublicAdditionalLibraries.AddRange(ConvertedLibPaths);

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

            // 工程需要的额外引擎三方依赖库
            AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL");
            AddEngineThirdPartyPrivateStaticDependencies(Target, "zlib");

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

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


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

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
                // ... add any modules that your module loads dynamically here ...
            }
                );
        }
    }
    public Steamworks(ReadOnlyTargetRules Target) : base(Target)
    {
        /** Mark the current version of the Steam SDK */
        string SteamVersion = "v146";

        Type = ModuleType.External;

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

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

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

        string SteamBinariesDir   = String.Format(Target.UEThirdPartyBinariesDirectory + "Steamworks/Steam{0}/", SteamVersion);
        string ArchPlatformPrefix = "";

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            ArchPlatformPrefix = "64";
            SteamBinariesDir  += "Win64/";
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            SteamBinariesDir += "Win32/";
        }

        // We do not need to explicitly link to these dlls however if they are provided in these directories, then we must take these versions.
        if (Target.Type == TargetType.Server && (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64))
        {
            string SteamClientDll = SteamBinariesDir + String.Format("steamclient{0}.dll", ArchPlatformPrefix);
            string SteamTier0Dll  = SteamBinariesDir + String.Format("tier0_s{0}.dll", ArchPlatformPrefix);
            string SteamVstDll    = SteamBinariesDir + String.Format("vstdlib_s{0}.dll", ArchPlatformPrefix);

            if (File.Exists(SteamClientDll) && File.Exists(SteamTier0Dll) && File.Exists(SteamVstDll))
            {
                System.Console.WriteLine("Linking with bundled steamclient binaries");
                RuntimeDependencies.Add(SteamClientDll);
                RuntimeDependencies.Add(SteamTier0Dll);
                RuntimeDependencies.Add(SteamVstDll);
            }
        }

        // Add the SDK headers
        PublicIncludePaths.Add(SdkBase + "/public");

        // Path for static linking (for Windows & Linux)
        string LibraryPath = SdkBase + "/redistributable_bin/";

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            // Add the lib paths
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                LibraryPath += "win64/";
            }

            PublicAdditionalLibraries.Add(LibraryPath + String.Format("steam_api{0}.lib", ArchPlatformPrefix));
            PublicDelayLoadDLLs.Add(String.Format("steam_api{0}.dll", ArchPlatformPrefix));
            RuntimeDependencies.Add(SteamBinariesDir + String.Format("steam_api{0}.dll", ArchPlatformPrefix));
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibraryPath = SteamBinariesDir + "Mac/libsteam_api.dylib";
            PublicDelayLoadDLLs.Add(LibraryPath);
            RuntimeDependencies.Add(LibraryPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                LibraryPath += "linux64/";
                PublicAdditionalLibraries.Add(LibraryPath + "libsteam_api.so");
            }
            else
            {
                LibraryPath += "linux64/libsteam_api.so";
                PublicDelayLoadDLLs.Add(LibraryPath);
            }

            SteamBinariesDir += String.Format("{0}", Target.Architecture);

            PrivateRuntimeLibraryPaths.Add(SteamBinariesDir);
            PublicAdditionalLibraries.Add(SteamBinariesDir + "/libsteam_api.so");
            RuntimeDependencies.Add(SteamBinariesDir + "/libsteam_api.so");
        }
    }
Exemplo n.º 13
0
    public Steamworks(ReadOnlyTargetRules Target) : base(Target)
    {
        /** Mark the current version of the Steam SDK */
        string SteamVersion = "v139";

        Type = ModuleType.External;

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

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

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

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

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

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

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

            if (Target.Type == TargetType.Server)
            {
                RuntimeDependencies.Add(SteamBinariesDir + "steamclient.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "tier0_s.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "vstdlib_s.dll");
            }
            else
            {
                // assume SteamController is needed
                RuntimeDependencies.Add("$(EngineDir)/Config/controller.vdf");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(LibraryPath + "win64");
            PublicAdditionalLibraries.Add(LibraryName + "64.lib");
            PublicDelayLoadDLLs.Add(LibraryName + "64.dll");

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

            if (Target.Type == TargetType.Server)
            {
                RuntimeDependencies.Add(SteamBinariesDir + "steamclient64.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "tier0_s64.dll");
                RuntimeDependencies.Add(SteamBinariesDir + "vstdlib_s64.dll");
            }
            else
            {
                // assume SteamController is needed
                RuntimeDependencies.Add("$(EngineDir)/Config/controller.vdf");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibraryPath += "osx32/libsteam_api.dylib";
            PublicDelayLoadDLLs.Add(LibraryPath);
            PublicAdditionalShadowFiles.Add(LibraryPath);
            AdditionalBundleResources.Add(new UEBuildBundleResource(LibraryPath, "MacOS"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                LibraryPath += "linux64";
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add(LibraryName);
            }
            else
            {
                LibraryPath += "linux64/libsteam_api.so";
                PublicDelayLoadDLLs.Add(LibraryPath);
            }
            string SteamBinariesPath = String.Format(Target.UEThirdPartyBinariesDirectory + "Steamworks/Steam{0}/{1}", SteamVersion, Target.Architecture);
            PrivateRuntimeLibraryPaths.Add(SteamBinariesPath);
            PublicAdditionalLibraries.Add(SteamBinariesPath + "/libsteam_api.so");
            RuntimeDependencies.Add(SteamBinariesPath + "/libsteam_api.so");
        }
    }
Exemplo n.º 14
0
        public USDImporter(ReadOnlyTargetRules Target) : base(Target)
        {
            PublicIncludePaths.AddRange(
                new string[] {
            }
                );

            PrivateIncludePaths.AddRange(
                new string[] {
                ModuleDirectory + "/../UnrealUSDWrapper/Source/Public",
            }
                );


            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "UnrealEd",
                "InputCore",
                "SlateCore",
                "PropertyEditor",
                "Slate",
                "EditorStyle",
                "RawMesh",
                "GeometryCache",
                "MeshDescription",
                "MeshUtilities",
                "PythonScriptPlugin",
                "RenderCore",
                "RHI",
                "MessageLog",
                "JsonUtilities",
            }
                );

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

            string BaseLibDir = ModuleDirectory + "/../UnrealUSDWrapper/Lib/";

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                string LibraryPath = BaseLibDir + "x64/Release/";
                PublicAdditionalLibraries.Add(LibraryPath + "/UnrealUSDWrapper.lib");

                foreach (string FilePath in Directory.EnumerateFiles(Path.Combine(ModuleDirectory, "../../Binaries/Win64/"), "*.dll", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux && Target.Architecture.StartsWith("x86_64"))
            {
                // link directly to runtime libs on Linux, as this also puts them into rpath
                string RuntimeLibraryPath = Path.Combine(ModuleDirectory, "../../Binaries", Target.Platform.ToString(), Target.Architecture.ToString());
                PrivateRuntimeLibraryPaths.Add(RuntimeLibraryPath);
                PublicAdditionalLibraries.Add(RuntimeLibraryPath + "/libUnrealUSDWrapper.so");

                foreach (string FilePath in Directory.EnumerateFiles(RuntimeLibraryPath, "*.so*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(FilePath);
                }
            }
        }