Пример #1
0
    public libdraco_ue4(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string        DracoPath    = System.IO.Path.Combine(ModuleDirectory, "libdraco-1.3.0");
        string        IncludePath  = System.IO.Path.Combine(DracoPath, "include");
        List <string> LibPaths     = new List <string>();
        List <string> LibFilePaths = new List <string>();

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

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

            string LibPath = System.IO.Path.Combine(DracoPath, "lib", PlatformName, "vs2019", "Release");
            LibPaths.Add(LibPath);

            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracodec.lib"));
            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracoenc.lib"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string LibPath = System.IO.Path.Combine(DracoPath, "lib", "macos");
            LibPaths.Add(LibPath);

            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracodec.a"));
            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracoenc.a"));
        }

        PublicIncludePaths.Add(IncludePath);
#if UE_4_24_OR_LATER
        PublicSystemLibraryPaths.AddRange(LibPaths);
#else
        PublicLibraryPaths.AddRange(LibPaths);
#endif
        PublicAdditionalLibraries.AddRange(LibFilePaths);
    }
Пример #2
0
    public libgltf_ue4(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

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

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

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

            string LibPath = System.IO.Path.Combine(glTFPath, "lib", PlatformName, "vs2019", "Release");
            LibPaths.Add(LibPath);

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

            LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.a");
        }

        PublicIncludePaths.Add(IncludePath);
#if UE_4_24_OR_LATER
        PublicSystemLibraryPaths.AddRange(LibPaths);
#else
        PublicLibraryPaths.AddRange(LibPaths);
#endif
        PublicAdditionalLibraries.Add(LibFilePath);
        PublicDefinitions.Add("LIBGLTF_CHARACTOR_ENCODING_IS_UTF8");
    }
Пример #3
0
    //Processes the JSON data produced by Conan that describes our dependencies
    private void ProcessDependencies(string depsJson, ReadOnlyTargetRules target, string stagingDir)
    {
        //We need to ensure libraries end with ".lib" under Windows
        string libSuffix = ((this.IsWindows(target)) ? ".lib" : "");

        //Attempt to parse the JSON file
        JsonObject deps = JsonObject.Read(new FileReference(depsJson));

        //Process the list of dependencies
        foreach (JsonObject dep in deps.GetObjectArrayField("dependencies"))
        {
            //Add the header and library paths for the dependency package
            PublicIncludePaths.AddRange(dep.GetStringArrayField("include_paths"));
            PublicSystemLibraryPaths.AddRange(dep.GetStringArrayField("lib_paths"));

            //Add the preprocessor definitions from the dependency package
            PublicDefinitions.AddRange(dep.GetStringArrayField("defines"));

            //Link against the libraries from the package
            string[] libs = dep.GetStringArrayField("libs");
            foreach (string lib in libs)
            {
                string libFull = lib + ((libSuffix.Length == 0 || lib.EndsWith(libSuffix)) ? "" : libSuffix);
                PublicAdditionalLibraries.Add(libFull);
            }

            //Ensure any shared libraries are staged alongside the binaries for the plugin
            List <string> searchDirs = new List <string>();
            searchDirs.AddRange(dep.GetStringArrayField("bin_paths"));
            searchDirs.AddRange(dep.GetStringArrayField("lib_paths"));
            foreach (string dir in searchDirs)
            {
                List <string> binaries = new List <string>();
                binaries.AddRange(Directory.GetFiles(dir, "*.dll"));
                binaries.AddRange(Directory.GetFiles(dir, "*.dylib"));
                binaries.AddRange(Directory.GetFiles(dir, "*.so"));
                foreach (string binary in binaries)
                {
                    RuntimeDependencies.Add(Path.Combine("$(BinaryOutputDir)", Path.GetFileName(binary)), binary, StagedFileType.NonUFS);
                }
            }

            //Copy any data files needed by the package into our staging directory
            string[] dataDirs = dep.GetStringArrayField("res_paths");
            foreach (string dir in dataDirs)
            {
                string[] files = Directory.GetFiles(dir, "*", SearchOption.AllDirectories);
                foreach (string file in files)
                {
                    RuntimeDependencies.Add(Path.Combine(stagingDir, Path.GetFileName(file)), file, StagedFileType.NonUFS);
                }
            }
        }
    }
Пример #4
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);
    }
Пример #5
0
    public VRPNLiveLink(ReadOnlyTargetRules Target) : base(Target)
    {
        bEnableExceptions = true;

        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicIncludePaths.AddRange
        (
            new string[]
        {
            "D:\\projects\\VRPN-Free-d.git\\submodules\\vrpn\\"
        }
        );


        PrivateIncludePaths.AddRange
        (
            new string[]
        {
            "D:\\projects\\VRPN-Free-d.git\\submodules\\vrpn\\"
        }
        );

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

        PrivateDependencyModuleNames.AddRange
        (
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "InputCore",
            "Json",
            "JsonUtilities",
            "Networking",
            "Sockets",
        }
        );

        PublicSystemLibraryPaths.AddRange
        (
            new string[]
        {
            "D:\\projects\\VRPN-Free-d.git\\install\\Release-x64\\"
        }
        );

        PublicAdditionalLibraries.AddRange
        (
            new string[]
        {
            "quatlib.lib",
            "vrpn.lib"
        }
        );

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