Exemple #1
0
    public SubstanceEngine(ReadOnlyTargetRules Target) : base(Target)
    {
        //Marked as an external module as we are not building any source code with this module
        Type = ModuleType.External;

        string BuildConfig      = GetBuildConfig(Target);
        string PlatformConfig   = GetPlatformConfig(Target);
        string SubstanceLibPath = ModuleDirectory + "/../../Libs/" + BuildConfig + "/" + PlatformConfig + "/";

        Dictionary <SubstanceEngineType, string> EngineLibs = new Dictionary <SubstanceEngineType, string>();
        List <string> StaticLibs = new List <string>();

        //add linker libraries
        StaticLibs.Add("pfxlinkercommon");
        StaticLibs.Add("algcompression");
        StaticLibs.Add("tinyxml");

        string LibExtension = "";
        string LibPrefix    = "";

        if (Target.Platform == UnrealTargetPlatform.Win32 ||
            Target.Platform == UnrealTargetPlatform.Win64)
        {
            LibExtension = ".lib";

            StaticLibs.Add("substance_linker_static");

            EngineLibs.Add(SubstanceEngineType.CPU, "substance_sse2_blend_static");
            EngineLibs.Add(SubstanceEngineType.GPU, "substance_d3d11pc_blend_static");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac ||
                 Target.Platform == UnrealTargetPlatform.Linux)
        {
            LibExtension = ".a";
            LibPrefix    = "lib";

            StaticLibs.Add("substance_linker");

            EngineLibs.Add(SubstanceEngineType.CPU, "substance_sse2_blend");
            EngineLibs.Add(SubstanceEngineType.GPU, "substance_ogl3_blend");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            LibExtension = ".a";
            LibPrefix    = "lib";

            StaticLibs.Add("substance_linker");

            EngineLibs.Add(SubstanceEngineType.CPU, "substance_avx_blend");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            LibExtension = ".lib";

            StaticLibs.Add("substance_linker");

            EngineLibs.Add(SubstanceEngineType.CPU, "substance_avx_blend");
        }
        else
        {
            throw new BuildException("Substance Plugin does not support platform " + Target.Platform.ToString());
        }

        if (Target.Type == TargetRules.TargetType.Editor)
        {
            PublicDefinitions.Add("AIR_NO_DEFAULT_ENGINE");
            PublicDefinitions.Add("SUBSTANCE_ENGINE_DYNAMIC");

            StaticLibs.Add("substance_framework_editor");

            if (BuildConfig == "Debug")
            {
                PublicDefinitions.Add("SUBSTANCE_ENGINE_DEBUG");
            }
        }
        else
        {
            PublicDefinitions.Add("AIR_NO_DYNLOAD");

            SubstanceEngineType type = GetEngineSuffix();

            if (EngineLibs.ContainsKey(type))
            {
                StaticLibs.Add(EngineLibs[type]);
            }
            else
            {
                StaticLibs.Add(EngineLibs[SubstanceEngineType.CPU]);
            }

            StaticLibs.Add("substance_framework");

            //Linux GPU requires certain libraries added
            if (Target.Platform == UnrealTargetPlatform.Linux && type == SubstanceEngineType.GPU)
            {
                PublicAdditionalLibraries.AddRange(new string[] { "X11", "glut", "GLU", "GL" });
            }
        }

        //add our static libs
        foreach (string staticlib in StaticLibs)
        {
            string libname = LibPrefix + staticlib + LibExtension;
            PublicAdditionalLibraries.Add(SubstanceLibPath + libname);
        }
    }
Exemple #2
0
    public UEOpenExr(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac || Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            bool   bDebug   = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT);
            string LibDir   = Target.UEThirdPartySourceDirectory + "openexr/Deploy/lib/";
            string Platform = "";
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                Platform = "x64";
                LibDir  += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            }
            else if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                Platform = "Win32";
                LibDir  += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                Platform = "Mac";
                bDebug   = false;
            }
            else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
            {
                Platform = "Linux";
                bDebug   = false;
            }
            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.IsInPlatformGroup(UnrealPlatformGroup.Unix) && Target.Architecture.StartsWith("x86_64"))
            {
                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",
            }
                );
        }
    }
Exemple #3
0
    public DX11(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";
        }

        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicSystemIncludePaths.Add(DirectXSDKDir + "/Include");

            PublicDefinitions.Add("WITH_D3DX_LIBS=1");

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

            PublicAdditionalLibraries.AddRange(
                new string[] {
                LibDir + "dxgi.lib",
                LibDir + "d3d9.lib",
                LibDir + "d3d11.lib",
                LibDir + "dxguid.lib",
                LibDir + "d3dcompiler.lib",
                (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? LibDir + "d3dx11d.lib" : LibDir + "d3dx11.lib",
                LibDir + "dinput8.lib",
                LibDir + "X3DAudio.lib",
                LibDir + "xapobase.lib",
                LibDir + "XAPOFX.lib"
            }
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            PublicDefinitions.Add("WITH_D3DX_LIBS=0");
        }

        else if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            PublicSystemIncludePaths.Add(DirectXSDKDir + "/Include");

            PublicDefinitions.Add("WITH_D3DX_LIBS=0");
            PublicSystemLibraries.AddRange(
                new string[] {
                "dxguid.lib",
            }
                );
        }
    }
    public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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


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

        string libPrefix;
        string libPostfix;
        string platform;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            platform   = "Windows-x64";
            libPostfix = ".lib";
            libPrefix  = "";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            platform   = "Darwin-x64";
            libPostfix = ".a";
            libPrefix  = "lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            platform   = "Linux-x64";
            libPostfix = ".a";
            libPrefix  = "lib";
        }
        else
        {
            platform   = "Unknown";
            libPostfix = ".Unknown";
            libPrefix  = "Unknown";
        }

        string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform);

        string releasePostfix = "";
        string debugPostfix   = "d";

        bool   preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame);
        string postfix     = preferDebug ? debugPostfix : releasePostfix;

        string[] libs = new string[]
        {
            "async++",
            "Cesium3DTiles",
            "CesiumAsync",
            "CesiumGeometry",
            "CesiumGeospatial",
            "CesiumGltfReader",
            "CesiumGltf",
            "CesiumJsonReader",
            "CesiumUtility",
            "draco",
            "modp_b64",
            "spdlog",
            "sqlite3",
            "tinyxml2",
            "uriparser"
        };

        if (preferDebug)
        {
            // We prefer Debug, but might still use Release if that's all that's available.
            foreach (string lib in libs)
            {
                string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix);
                if (!File.Exists(debugPath))
                {
                    Console.WriteLine("Using release build of cesium-native because a debug build is not available.");
                    preferDebug = false;
                    postfix     = releasePostfix;
                    break;
                }
            }
        }

        PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix)));

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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "RHI",
            "CoreUObject",
            "Engine",
            "MeshDescription",
            "StaticMeshDescription",
            "HTTP",
            "MikkTSpace",
            "LevelSequence",
            "Projects"
        }
            );

        PublicDefinitions.AddRange(
            new string[]
        {
            "SPDLOG_COMPILED_LIB",
            "LIBASYNC_STATIC"
        }
            );

        if (Target.bCompilePhysX && !Target.bUseChaos)
        {
            PrivateDependencyModuleNames.Add("PhysXCooking");
            PrivateDependencyModuleNames.Add("PhysicsCore");
        }
        else
        {
            PrivateDependencyModuleNames.Add("Chaos");
        }

        if (Target.bBuildEditor == true)
        {
            PublicDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd",
                "Slate",
                "SlateCore",
            }
                );
        }

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

        PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
        PrivatePCHHeaderFile = "Private/PCH.h";
        CppStandard          = CppStandardVersion.Cpp17;
        bEnableExceptions    = true;
    }
    public libdraco_ue4(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string        DracoPath    = System.IO.Path.Combine(ModuleDirectory, "libdraco-1.3.6");
        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 TargetConfiguration = "Release";
            if (Target.Configuration == UnrealTargetConfiguration.Debug)
            {
                TargetConfiguration = "Debug";
            }

            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", PlatformName, "vs2019", TargetConfiguration));

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

            LibFilePaths.Add("libdracodec.a");
            LibFilePaths.Add("libdracoenc.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "macos"));

            LibFilePaths.Add("libdracodec.a");
            LibFilePaths.Add("libdracoenc.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "armeabi-v7a"));
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "armeabi-v7a-with-neon"));
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "arm64-v8a"));
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "x86"));
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "x86_64"));

            LibFilePaths.Add("libdracodec.a");
            LibFilePaths.Add("libdracoenc.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "ios", "os"));
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "ios", "simulator"));
            LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "ios", "watchos"));

            LibFilePaths.Add("libdracodec.a");
            LibFilePaths.Add("libdracoenc.a");
        }

        PublicIncludePaths.Add(IncludePath);
        PublicLibraryPaths.AddRange(LibPaths);
        PublicAdditionalLibraries.AddRange(LibFilePaths);
    }
    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 ...
        }
            );
    }
    public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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

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

        string libPrefix;
        string libPostfix;
        string platform;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            platform   = "Windows-x64";
            libPostfix = ".lib";
            libPrefix  = "";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            platform   = "Darwin-x64";
            libPostfix = ".a";
            libPrefix  = "lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            platform   = "Android-xaarch64";
            libPostfix = ".a";
            libPrefix  = "lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            platform   = "Linux-x64";
            libPostfix = ".a";
            libPrefix  = "lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            platform   = "iOS-xarm64";
            libPostfix = ".a";
            libPrefix  = "lib";
        }
        else
        {
            platform   = "Unknown";
            libPostfix = ".Unknown";
            libPrefix  = "Unknown";
        }

        string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform);

        string releasePostfix = "";
        string debugPostfix   = "d";

        bool   preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame);
        string postfix     = preferDebug ? debugPostfix : releasePostfix;

        string[] libs = new string[]
        {
            "async++",
            "Cesium3DTilesSelection",
            "CesiumAsync",
            "CesiumGeometry",
            "CesiumGeospatial",
            "CesiumGltfReader",
            "CesiumGltf",
            "CesiumJsonReader",
            "CesiumUtility",
            "draco",
            "ktx_read",
            //"MikkTSpace",
            "modp_b64",
            "s2geometry",
            "spdlog",
            "sqlite3",
            "tinyxml2",
            "uriparser",
            "ktx_read"
        };

        // Use our own copy of MikkTSpace on Android.
        if (Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.IOS)
        {
            libs = libs.Concat(new string[] { "MikkTSpace" }).ToArray();
            PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../ThirdParty/include/mikktspace"));
        }

        if (preferDebug)
        {
            // We prefer Debug, but might still use Release if that's all that's available.
            foreach (string lib in libs)
            {
                string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix);
                if (!File.Exists(debugPath))
                {
                    Console.WriteLine("Using release build of cesium-native because a debug build is not available.");
                    preferDebug = false;
                    postfix     = releasePostfix;
                    break;
                }
            }
        }

        PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix)));

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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "RHI",
            "CoreUObject",
            "Engine",
            "MeshDescription",
            "StaticMeshDescription",
            "HTTP",
            "LevelSequence",
            "Projects",
            "RenderCore",
            "SunPosition",
            "DeveloperSettings"
        }
            );

        // Use UE's MikkTSpace on non-Android
        if (Target.Platform != UnrealTargetPlatform.Android)
        {
            PrivateDependencyModuleNames.Add("MikkTSpace");
        }


        PublicDefinitions.AddRange(
            new string[]
        {
            "SPDLOG_COMPILED_LIB",
            "LIBASYNC_STATIC",
            "GLM_FORCE_XYZW_ONLY",
            "GLM_FORCE_EXPLICIT_CTOR",
            "GLM_FORCE_SIZE_T_LENGTH",
            //"CESIUM_TRACING_ENABLED"
        }
            );

        if (Target.bCompilePhysX && !Target.bUseChaos)
        {
            PrivateDependencyModuleNames.Add("PhysXCooking");
            PrivateDependencyModuleNames.Add("PhysicsCore");
        }
        else
        {
            PrivateDependencyModuleNames.Add("Chaos");
        }

        if (Target.bBuildEditor == true)
        {
            PublicDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd",
                "Slate",
                "SlateCore",
                "WorldBrowser"
            }
                );
        }

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

        PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
        PrivatePCHHeaderFile = "Private/PCH.h";
        CppStandard          = CppStandardVersion.Cpp17;
        bEnableExceptions    = true;

        if (Target.Platform == UnrealTargetPlatform.IOS ||
            (Target.Platform == UnrealTargetPlatform.Android &&
             Target.Version.MajorVersion == 4 &&
             Target.Version.MinorVersion == 26 &&
             Target.Version.PatchVersion < 2))
        {
            // In UE versions prior to 4.26.2, the Unreal Build Tool on Android
            // (AndroidToolChain.cs) ignores the CppStandard property and just
            // always uses C++14. Our plugin can't be compiled with C++14.
            //
            // So this hack uses reflection to add an additional argument to
            // the compiler command-line to force C++17 mode. Clang ignores all
            // but the last `-std=` argument, so the `-std=c++14` added by the
            // UBT is ignored.
            //
            // This is also needed for iOS builds on all engine versions as Unreal
            // defaults to c++14 regardless of the CppStandard setting
            Type        type       = Target.GetType();
            FieldInfo   innerField = type.GetField("Inner", BindingFlags.Instance | BindingFlags.NonPublic);
            TargetRules inner      = (TargetRules)innerField.GetValue(Target);
            inner.AdditionalCompilerArguments += " -std=c++17";
        }
    }
    public GRPC(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        //PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDefinitions.Add("GOOGLE_PROTOBUF_NO_RTTI");
        PublicDefinitions.Add("GPR_FORBID_UNREACHABLE_CODE");
        PublicDefinitions.Add("GRPC_ALLOW_EXCEPTIONS=0");

        //TODO: We do this because in file generated_message_table_driven.h that located in protobuf sources
        //TODO: line 174: static_assert(std::is_pod<AuxillaryParseTableField>::value, "");
        //TODO: causes С4647 level 3 warning __is_pod behavior change
        //TODO: UE4 threading some warnings as errors, and we have no chance to suppress this stuff
        //TODO: So, we don't want to change any third-party code, this why we add this definition
        PublicDefinitions.Add("__NVCC__");

        #region 弃用
        //Platform = Target.Platform;
        //Configuration = Target.Configuration;
        //ModuleDepPaths moduleDepPaths = GatherDeps();
        //Console.WriteLine(moduleDepPaths.ToString());
        //PublicIncludePaths.AddRange(moduleDepPaths.HeaderPaths);
        #endregion

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

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

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

        #region 弃用
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_bad_optional_access.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_bad_variant_access.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_base.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_city.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_civil_time.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_cord.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_debugging_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_demangle_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_exponential_biased.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_graphcycles_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_hash.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_hashtablez_sampler.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_int128.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_log_severity.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_malloc_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_raw_hash_set.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_raw_logging_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_spinlock_wait.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_stacktrace.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_status.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_statusor.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_str_format_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_strings.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_strings_internal.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_symbolize.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_synchronization.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_throw_delegate.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_time.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "absl_time_zone.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "address_sorting.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "cares.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "crypto.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "gpr.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc_plugin_support.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc_unsecure.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc++.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc++_alts.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc++_error_details.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc++_reflection.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpc++_unsecure.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "grpcpp_channelz.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "libprotobuf.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "libprotobuf-lite.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "libprotoc.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "re2.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "ssl.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "upb.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "zlib.lib"));
        //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "lib", "zlibstatic.lib"));
        #endregion

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

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

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            // ... add private dependencies that you statically link with 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 GameAnalytics(TargetInfo Target)
        {
            var GameAnalyticsPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../ThirdParty/"));
            var libPath           = Path.Combine(GameAnalyticsPath, "lib");

            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win64:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "GameAnalytics.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_atomic-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_chrono-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_date_time-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_filesystem-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_log-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_log_setup-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_regex-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_system-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libboost_thread-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "cppnetlib-client-connections.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "cppnetlib-uri.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "ssleay32MT.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "libeay32MT.lib"));
                break;

            case UnrealTargetPlatform.Win32:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "GameAnalytics.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_atomic-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_chrono-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_date_time-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_filesystem-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_log-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_log_setup-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_regex-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_system-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libboost_thread-vc140-mt-1_60.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "cppnetlib-client-connections.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "cppnetlib-uri.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "ssleay32MT.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "libeay32MT.lib"));
                break;

            case UnrealTargetPlatform.Android:
                PrivateDependencyModuleNames.Add("Launch");
                break;

            case UnrealTargetPlatform.Mac:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libGameAnalytics.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_chrono-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_filesystem-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_log-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_log_setup-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_regex-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_system-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libboost_thread-mt.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libcppnetlib-client-connections.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libcppnetlib-uri.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libcrypto.a"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libssl.a"));
                break;

            case UnrealTargetPlatform.IOS:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "ios", "libGameAnalytics.a"));
                PublicFrameworks.AddRange(
                    new string[] {
                    "AdSupport",
                    "SystemConfiguration"
                }
                    );

                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    "sqlite3",
                    "z",
                    "c++"
                });
                break;

            case UnrealTargetPlatform.XboxOne:
            case UnrealTargetPlatform.PS4:
            case UnrealTargetPlatform.WinRT:
            case UnrealTargetPlatform.WinRT_ARM:
            case UnrealTargetPlatform.HTML5:
            case UnrealTargetPlatform.Linux:
            default:
                throw new NotImplementedException("This target platform is not configured for GameAnalytics SDK: " + Target.Platform.ToString());
            }

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

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

            PrivateIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "Private")));
            PrivateIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "Public")));
            PublicIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "Public")));


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

            PublicIncludePathModuleNames.AddRange(
                new string[]
            {
                "Analytics",
                "Engine"
            }
                );

            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
                AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "GameAnalytics_APL.xml")));
            }
        }
Exemple #10
0
    public LidarSim(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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

        PublicSystemIncludePaths.AddRange(
            new string[]
        {
            //
        }
            );

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

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

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

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

        PublicAdditionalLibraries.AddRange(
            new string[]
        {
            //
        }
            );
    }
Exemple #11
0
    public llvm(TargetInfo Target)
    {
        Type = ModuleType.External;

        if (Target.Platform != UnrealTargetPlatform.Win32)
        {
            // Currently we support only Win32 llvm builds.
            return;
        }

        var LLVMVersion = @"3.5.0";

        // VS2015 uses a newer version of the libs
        if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)
        {
            LLVMVersion = @"3.6.2";
        }
        var VSVersion     = @"vs" + WindowsPlatform.GetVisualStudioCompilerVersionName();
        var TargetArch    = @"x86";
        var RootDirectory = Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, @"llvm", LLVMVersion);

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

        PublicLibraryPaths.AddRange(
            new string[] {
            Path.Combine(RootDirectory, @"lib", VSVersion, TargetArch, @"release"),
        });

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "clangAnalysis.lib",
            "clangAST.lib",
            "clangBasic.lib",
            "clangDriver.lib",
            "clangEdit.lib",
            "clangFrontend.lib",
            "clangLex.lib",
            "clangParse.lib",
            "clangSema.lib",
            "clangSerialization.lib",
            "clangTooling.lib",
            "LLVMAnalysis.lib",
            "LLVMBitReader.lib",
            "LLVMCodegen.lib",
            "LLVMCore.lib",
            "LLVMMC.lib",
            "LLVMMCDisassembler.lib",
            "LLVMMCParser.lib",
            "LLVMObject.lib",
            "LLVMOption.lib",
            "LLVMSupport.lib",
            "LLVMTarget.lib",
            "LLVMX86AsmParser.lib",
            "LLVMX86AsmPrinter.lib",
            "LLVMX86CodeGen.lib",
            "LLVMX86Desc.lib",
            "LLVMX86Info.lib",
            "LLVMX86Utils.lib",
        });

        // The 3.6.2 version we use for VS2015 has moved some functionality around.
        if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)
        {
            PublicAdditionalLibraries.AddRange(
                new string[] {
                "LLVMTransformUtils.lib",
            });
        }
    }
Exemple #12
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);
                if (!PythonSDK.IsValid())
                {
                    PythonSDK = null;
                }
            }
        }

        // 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")
                    }, new List <string>()
                    {
                        Path.Combine(PythonSourceTPSDir, PlatformDir, "libs", "python27.lib")
                    }),
                    //DiscoverPythonSDK("C:/Program Files/Python37"),
                    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")
                    }, new List <string>()
                    {
                        Path.Combine(PythonBinaryTPSDir, "Mac", "libpython2.7.dylib")
                    }),
                }
                    );
            }
            else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
            {
                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)
                        },
                            new List <string>()
                        {
                            Path.Combine(PythonSourceTPSDir, PlatformDir, "lib", "libpython2.7.a")
                        }),
                    });
                    PublicSystemLibraries.Add("util");                          // part of libc
                }
            }

            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;
            var    IsEnginePython           = EngineRelativePythonRoot.StartsWith(EngineDir);
            if (IsEnginePython)
            {
                // 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.PythonIncludePaths);
            PublicAdditionalLibraries.AddRange(PythonSDK.PythonLibs);
            if (Target.Platform == UnrealTargetPlatform.Linux && IsEnginePython)
            {
                RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Python/Linux/lib/libpython2.7.so.1.0");
            }
        }
    }
Exemple #13
0
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bFasterWithoutUnity = string.IsNullOrEmpty(enableUnityBuild);

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


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


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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "InputCore",
            "Slate",
            "SlateCore",
            "MovieScene",
            "LevelSequence",
            "HTTP",
            "UMG",
            "AppFramework",
            "RHI",
            "Voice",
            "RenderCore",
            "MovieSceneCapture",
            "Landscape",
            "Foliage",
            "AIModule"
            // ... add private dependencies that you statically link with here ...
        }
            );


#if WITH_FORWARDED_MODULE_RULES_CTOR
        BuildVersion Version;
        if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version))
        {
            if (Version.MinorVersion >= 18)
            {
                PrivateDependencyModuleNames.Add("ApplicationCore");
            }
        }
#endif


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

#if WITH_FORWARDED_MODULE_RULES_CTOR
        if (Target.bBuildEditor)
#else
        if (UEBuildConfiguration.bBuildEditor)
#endif
        {
            System.Console.WriteLine("Adding UEPy Editor dependencies");
            PrivateDependencyModuleNames.AddRange(new string[] {
                "UnrealEd",
                "LevelEditor",
                "BlueprintGraph",
                "Projects",
                "Sequencer",
                "SequencerWidgets",
                "AssetTools",
                "LevelSequenceEditor",
                "MovieSceneTools",
                "MovieSceneTracks",
                "CinematicCamera",
                "EditorStyle",
                "GraphEditor",
                "UMGEditor",
                "AIGraph",
                "RawMesh",
                "DesktopWidgets",
                "EditorWidgets",
                "FBX",
                "Persona",
                "PropertyEditor",
                "LandscapeEditor",
                "MaterialEditor"
            });
        }
        else
        {
            System.Console.WriteLine("Not adding UEPy Editor dependencies");
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(windowsKnownPaths, "Win64");
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetWindowsPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicAdditionalLibraries.Add(libPath);
            RuntimeDependencies.Add(System.IO.Path.Combine(ModuleDirectory, "../../EmbeddedPython/..."), StagedFileType.NonUFS);

            string dllPath = Path.Combine(pythonHome, Path.ChangeExtension(Path.GetFileName(libPath), "dll"));
            CopyToBinaries(dllPath, Target.Platform.ToString());
            string binariesDir = Path.Combine(ModuleDirectory, "../../../../Binaries", Target.Platform.ToString());
            RuntimeDependencies.Add(Path.Combine(binariesDir, Path.GetFileName(dllPath)), StagedFileType.NonUFS);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(macKnownPaths, "Mac");
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetMacPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicDelayLoadDLLs.Add(libPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (pythonHome == "")
            {
                string includesPath = DiscoverLinuxPythonIncludesPath();
                if (includesPath == null)
                {
                    throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
                }
                string libsPath = DiscoverLinuxPythonLibsPath();
                if (libsPath == null)
                {
                    throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
                }
                System.Console.WriteLine("Discovered Python includes in " + includesPath);
                System.Console.WriteLine("Discovered Python lib at " + libsPath);
                PublicIncludePaths.Add(includesPath);
//                PublicIncludePaths.Add("/usr/include");
//                PublicIncludePaths.Add("/home/a/src/deepdrive-sim-2.1/Plugins/UnrealEnginePython/linux/include");
                PublicAdditionalLibraries.Add(libsPath);
                PublicAdditionalLibraries.AddRange(new string[] { "pthread", "dl", "util", "m" });
                RuntimeDependencies.Add(System.IO.Path.Combine(ModuleDirectory, "../../EmbeddedPython/..."), StagedFileType.NonUFS);
            }
            else
            {
                string[] items = pythonHome.Split(';');
                System.Console.WriteLine("Using Python includes from " + items[0]);
                PublicIncludePaths.Add(items[0]);
                System.Console.WriteLine("Using Python libs at " + items[1]);
                PublicAdditionalLibraries.Add(items[1]);
            }
        }
#if WITH_FORWARDED_MODULE_RULES_CTOR
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/python35/include"));
            PublicLibraryPaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/armeabi-v7a"));
            PublicAdditionalLibraries.Add("python3.5m");

            string APLName    = "UnrealEnginePython_APL.xml";
            string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(ModuleDirectory, APLName), Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", RelAPLPath));
        }
#endif
    }
		public CognitiveVR(ReadOnlyTargetRules Target): base(Target)
		{
			PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
			
            PublicIncludePathModuleNames.AddRange(
                new string[] {
                    "Core",
                    "CoreUObject",
                    "Engine",
					"Analytics"
					// ... add public include paths required here ...
				}
				);
			
			PrivateIncludePaths.AddRange(
				new string[] {
					"CognitiveVR/Private",
                    "CognitiveVR/Public",
					"CognitiveVR/Private/util"
					// ... add other private include paths required here ...
				}
				);

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

			PublicDependencyModuleNames.AddRange(
				new string[]
				{
					"Core",
					"CoreUObject",
					"Engine",
					"AnalyticsBlueprintLibrary",
					"Analytics",
					"AnalyticsVisualEditing",
					"Projects",
					"HTTP",
					"Json",
                    "JsonUtilities",
					"UMG"
                }
				);
		var pluginsDirectory = System.IO.Path.Combine(Target.ProjectFile.Directory.ToString(),"Plugins");
		
		//Varjo
		if (System.IO.Directory.Exists(System.IO.Path.Combine(pluginsDirectory,"Varjo")))
		{
			System.Console.WriteLine("CognitiveVR.Build.cs found Varjo Plugin folder");
			PublicDependencyModuleNames.Add("VarjoHMD");
			PublicDependencyModuleNames.Add("VarjoEyeTracker");
		}
		
		//TobiiEyeTracking
		if (System.IO.Directory.Exists(System.IO.Path.Combine(pluginsDirectory,"TobiiEyeTracking")))
		{
			System.Console.WriteLine("CognitiveVR.Build.cs found TobiiEyeTracking Plugin folder");
			PrivateIncludePaths.AddRange(
				new string[] {
					"../../TobiiEyeTracking/Source/TobiiCore/Private",
					"../../TobiiEyeTracking/Source/TobiiCore/Public"
				});

			PublicDependencyModuleNames.Add("TobiiCore");
		}
		
		
		
		//Vive Pro Eye (SRanipal)
		if (System.IO.Directory.Exists(System.IO.Path.Combine(pluginsDirectory,"SRanipal"))) 
		{
			//ideally read the uplugin file as json and get the VersionName
			//for now, just read the source directory layout
			var sranipalPlugin = System.IO.Path.Combine(pluginsDirectory,"SRanipal");
			var sranipalSource = System.IO.Path.Combine(sranipalPlugin,"Source");
			string[] sourceModules = System.IO.Directory.GetDirectories(sranipalSource);
			if (sourceModules.Length == 2)//1.1.0.1 and 1.2.0.1 only have eye and lip modules
			{
				Definitions.Add("SRANIPAL_1_2_API");
				System.Console.WriteLine("CognitiveVR.Build.cs found SRanipal Plugin folder");
				PrivateIncludePaths.AddRange(
					new string[] {
						"../../SRanipal/Source/SRanipal/Private",
						"../../SRanipal/Source/SRanipal/Public"
					});

				PublicDependencyModuleNames.Add("SRanipal");

				string BaseDirectory = System.IO.Path.GetFullPath(System.IO.Path.Combine(ModuleDirectory, "..", "..", ".."));
				string SRanipalDir = System.IO.Path.Combine(BaseDirectory,"SRanipal","Binaries",Target.Platform.ToString());
				PublicAdditionalLibraries.Add(System.IO.Path.Combine(SRanipalDir,"SRanipal.lib"));
				PublicDelayLoadDLLs.Add(System.IO.Path.Combine(SRanipalDir,"SRanipal.dll"));	
			}
			else if (sourceModules.Length == 5)
			{
				Definitions.Add("SRANIPAL_1_3_API");
				System.Console.WriteLine("CognitiveVR.Build.cs found SRanipal Plugin folder 1.3.0.9 or newer");
				PrivateIncludePaths.AddRange(
					new string[] {
						"../../SRanipal/Source/SRanipal/Private",
						"../../SRanipal/Source/SRanipal/Public",
						"../../SRanipal/Source/SRanipalEye/Private",
						"../../SRanipal/Source/SRanipalEye/Public",
						"../../SRanipal/Source/SRanipalEyeTracker/Private",
						"../../SRanipal/Source/SRanipalEyeTracker/Public"
					});

				PublicDependencyModuleNames.Add("SRanipal");
				PublicDependencyModuleNames.Add("SRanipalEye");
				PublicDependencyModuleNames.Add("SRanipalEyeTracker");

				string BaseDirectory = System.IO.Path.GetFullPath(System.IO.Path.Combine(ModuleDirectory, "..", "..", ".."));
				string SRanipalDir = System.IO.Path.Combine(BaseDirectory,"SRanipal","Binaries",Target.Platform.ToString());
				PublicAdditionalLibraries.Add(System.IO.Path.Combine(SRanipalDir,"SRanipal.lib"));
				PublicDelayLoadDLLs.Add(System.IO.Path.Combine(SRanipalDir,"SRanipal.dll"));	
			}
		}

		//Pico Neo 2 Eye
		if (System.IO.Directory.Exists(System.IO.Path.Combine(pluginsDirectory,"PicoMobile")))
		{
			System.Console.WriteLine("CognitiveVR.Build.cs found Pico Plugin folder");
			PublicDependencyModuleNames.Add("PicoMobile");
		}

        //HP Omnicept
		if (System.IO.Directory.Exists(System.IO.Path.Combine(pluginsDirectory, "HPGlia")))
		{
			System.Console.WriteLine("CognitiveVR.Build.cs found HP Glia Omnicept folder");
			PublicDependencyModuleNames.Add("HPGlia");
		}

		if (Target.Platform == UnrealTargetPlatform.Win32 ||
            Target.Platform == UnrealTargetPlatform.Win64)
        {
            // Add __WINDOWS_WASAPI__ so that RtAudio compiles with WASAPI
            PublicDefinitions.Add("__WINDOWS_DS__");

            // Allow us to use direct sound
            AddEngineThirdPartyPrivateStaticDependencies(Target, "DirectSound");
			
			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"
					}
				);
			}
        }
Exemple #15
0
    public AlembicLib(TargetInfo Target)
    {
        Type = ModuleType.External;
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac)
        {
            bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT);

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

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

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

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

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    "Half.lib",
                    "Iex.lib",
                    "IlmThread.lib",
                    "Imath.lib",
                    "hdf5.lib",
                    "hdf5_hl.lib",
                    "AlembicAbc.lib",
                    "AlembicAbcCollection.lib",
                    "AlembicAbcCoreAbstract.lib",
                    "AlembicAbcCoreFactory.lib",
                    "AlembicAbcCoreHDF5.lib",
                    "AlembicAbcCoreOgawa.lib",
                    "AlembicAbcGeom.lib",
                    "AlembicAbcMaterial.lib",
                    "AlembicOgawa.lib",
                    "AlembicUtil.lib",
                    "zlib_64.lib"
                }
                    );

                if (BuildConfiguration.bDebugBuildsActuallyUseDebugCRT && bDebug)
                {
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Plugins/Experimental/AlembicImporter/Binaries/ThirdParty/zlib/zlibd1.dll"));
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    LibDir + "/libilmbase.a",
                    LibDir + "/libhdf5.a",
                    LibDir + "/libhdf5_hl.a",
                    LibDir + "/libAlembicAbc.a",
                    LibDir + "/libAlembicAbcCollection.a",
                    LibDir + "/libAlembicAbcCoreAbstract.a",
                    LibDir + "/libAlembicAbcCoreFactory.a",
                    LibDir + "/libAlembicAbcCoreHDF5.a",
                    LibDir + "/libAlembicAbcCoreOgawa.a",
                    LibDir + "/libAlembicAbcGeom.a",
                    LibDir + "/libAlembicAbcMaterial.a",
                    LibDir + "/libAlembicOgawa.a",
                    LibDir + "/libAlembicUtil.a",
                }
                    );
            }

            PublicIncludePaths.Add(ModuleDirectory + "/Deploy/include/");
        }
    }
Exemple #16
0
    public MidiInterface(TargetInfo Target)
#endif
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicIncludePaths.AddRange(
            new string[] {
            "MidiInterface/Public"
        }
            );


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


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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject", "Engine", "Slate", "SlateCore", "Midi"
        }
            );


        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            Definitions.Add("__WINDOWS_MM__=1");
            PublicAdditionalLibraries.Add("winmm.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS)
        {
            Definitions.Add("__MACOSX_CORE__=1");
            PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple" });

            if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Mac" });
            }
            else
            {
                PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/IOS" });
            }

            PublicFrameworks.AddRange(new string[]
            {
                "CoreMIDI", "CoreAudio", "CoreFoundation"
            });
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            Definitions.Add("__LINUX_ALSA__=1");

            PublicIncludePaths.Add("Runtime/Core/Public/Linux");

            PublicAdditionalLibraries.AddRange(
                new string[]
            {
                "/usr/lib/x86_64-linux-gnu/libasound.so", "/lib/x86_64-linux-gnu/libpthread-2.23.so"
            });
        }
    }
Exemple #17
0
    public Vorbis(TargetInfo Target)
    {
        Type = ModuleType.External;

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

        PublicIncludePaths.Add(VorbisPath + "include");
        Definitions.Add("WITH_OGGVORBIS=1");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string VorbisLibPath = VorbisPath + "Lib/win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            PublicLibraryPaths.Add(VorbisLibPath);

            PublicAdditionalLibraries.Add("libvorbis_64.lib");
            PublicDelayLoadDLLs.Add("libvorbis_64.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            string VorbisLibPath = VorbisPath + "Lib/win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
            PublicLibraryPaths.Add(VorbisLibPath);

            PublicAdditionalLibraries.Add("libvorbis.lib");
            PublicDelayLoadDLLs.Add("libvorbis.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            string VorbisLibPath = VorbisPath + "Lib/HTML5Win32/";
            PublicLibraryPaths.Add(VorbisLibPath);
            PublicAdditionalLibraries.Add("libvorbis.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.AddRange(
                new string[] {
                VorbisPath + "macosx/libvorbis.dylib",
            }
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            if (UEBuildConfiguration.bCompileForSize)
            {
                PublicAdditionalLibraries.Add(VorbisPath + "Lib/HTML5/libvorbis_Oz.bc");
            }
            else
            {
                PublicAdditionalLibraries.Add(VorbisPath + "Lib/HTML5/libvorbis.bc");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // toolchain will filter
            PublicLibraryPaths.Add(VorbisPath + "Lib/Android/ARMv7");
            PublicLibraryPaths.Add(VorbisPath + "Lib/Android/ARM64");
            PublicLibraryPaths.Add(VorbisPath + "Lib/Android/x86");
            PublicLibraryPaths.Add(VorbisPath + "Lib/Android/x64");

            PublicAdditionalLibraries.Add("vorbis");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicAdditionalLibraries.Add(VorbisPath + "lib/Linux/" + Target.Architecture + "/libvorbis.a");
        }
    }
Exemple #18
0
    public IntelTBB(TargetInfo Target)
    {
        Type = ModuleType.External;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string IntelTBBPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/";
            PublicSystemIncludePaths.Add(IntelTBBPath + "Include");

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

            // 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",
            }
                );
        }
    }
Exemple #19
0
    public UEOpenEXR(TargetInfo Target)
    {
        Type = ModuleType.External;
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac)
        {
            bool   bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT);
            string LibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "openexr/Deploy/lib/";
            string Platform;
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win64:
                Platform = "x64";
                LibDir  += "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                break;

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

            case UnrealTargetPlatform.Mac:
                Platform = "Mac";
                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",
                }
                    );
            }

            PublicSystemIncludePaths.AddRange(
                new string[] {
                UEBuildConfiguration.UEThirdPartySourceDirectory + "openexr/Deploy/include",
            }
                );
        }
    }
    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 void LoadOpenCV(ReadOnlyTargetRules Target)
    {
        string opencv_dir = Path.Combine(ThirdPartyPath, "opencv");

        // Include OpenCV headers
        PublicIncludePaths.Add(Path.Combine(opencv_dir, "include"));

        // Libraries are platform-dependent
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            Console.WriteLine("AUR: OpenCV for Win64");

            var suffix = OpenCVVersion;
            if (IsDebug(Target))
            {
                Console.WriteLine("AUR: Debug");
                suffix += "d";
            }
            else
            {
                Console.WriteLine("AUR: Not debug");
            }

            // Add the aur_allocator fix for crashes on windows
            List <string> modules = new List <string>();
            modules.AddRange(OpenCVModules);
            //modules.Add("opencv_aur_allocator");

            // Static linking
            var lib_dir = Path.Combine(opencv_dir, "install", "Win64", "x64", "vc15", "lib");
            PublicAdditionalLibraries.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(lib_dir, m + suffix + ".lib"))
                );

            // Dynamic libraries
            // The DLLs need to be in Binaries/Win64 anyway, so let us keep them there instead of ThirdParty/opencv
            PublicDelayLoadDLLs.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), m + suffix + ".dll"))
                );

            bEnableExceptions = true;
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            Console.WriteLine("AUR: OpenCV for Linux");

            //var lib_dir = Path.Combine(opencv_dir, "install", "Linux", "lib");
            //var opencv_libs = OpenCVModules.ConvertAll(m => Path.Combine(lib_dir, "lib" + m + ".a"));

            var opencv_libs = OpenCVModules.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), "lib" + m + ".so"));
            PublicAdditionalLibraries.AddRange(opencv_libs);

            PublicAdditionalLibraries.AddRange(
                LinuxStdLibs.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), m))
                );

            //var lib_dir_other = Path.Combine(opencv_dir, "install", "Linux", "share", "OpenCV", "3rdparty", "lib");
            //var opencv_libs_other = LinuxAdditionalLibs.ConvertAll(m => Path.Combine(lib_dir_other, m));
            //PublicAdditionalLibraries.AddRange(opencv_libs_other);
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            Console.WriteLine("AUR: Android with arch=", Target.Architecture);

            var arch = "armeabi-v7a";             //Target.Architecture

            var src_dir = Path.Combine(opencv_dir, "install", "Android", "sdk", "native");

            var modules_lib_dir = Path.Combine(src_dir, "libs", arch);
            var opencv_libs     = OpenCVModules.ConvertAll(
                m => Path.Combine(modules_lib_dir, "lib" + m + ".a")
                );
            PublicLibraryPaths.Add(modules_lib_dir);
            PublicAdditionalLibraries.AddRange(opencv_libs);

            var thirdparty_lib_dir = Path.Combine(src_dir, "3rdparty", "libs", arch);
            var thirdparty_libs    = new List <string>(Directory.GetFiles(thirdparty_lib_dir)).ConvertAll(
                fn => Path.Combine(thirdparty_lib_dir, fn)
                );
            PublicLibraryPaths.Add(thirdparty_lib_dir);
            PublicAdditionalLibraries.AddRange(thirdparty_libs);

            bEnableExceptions = true;
        }
        else
        {
            Console.WriteLine("AUR: No prebuilt binaries for OpenCV on platform " + Target.Platform);
        }
    }
Exemple #22
0
    public GVoiceSDK(TargetInfo Target)
#endif
    {
        string GVoiceLibPath = string.Empty;

        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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


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


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


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


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


        string PluginPath          = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../"));
        string GVoiceThirdPartyDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "../ThirdParty/GVoiceSDKLibrary"));

        System.Console.WriteLine("-------------- PluginPath = " + PluginPath);

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });

            string aplPath = Path.Combine(PluginPath, "Source/GVoiceSDK/GVoiceSDK_APL.xml");
            System.Console.WriteLine("-------------- AplPath = " + aplPath);
            AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", aplPath));
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PrivateIncludePaths.Add("GVoiceSDK/Private/IOS");
            PublicIncludePaths.AddRange(new string[] { "Runtime/ApplicationCore/Public/Apple", "Runtime/ApplicationCore/Public/IOS" });

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

            /*
             * BuildVersion Version;
             * if(BuildVersion.TryRead(out Version))
             * {
             *  System.Console.WriteLine("-------------- version = " + Version.MajorVersion +"."+Version.MinorVersion);
             *  if(Version.MajorVersion > 4 || (Version.MajorVersion == 4 && Version.MinorVersion >= 18))
             *  {
             *      PrivateDependencyModuleNames.AddRange(
             *      new string[]{"ApplicationCore"
             *      // ... add private dependencies that you statically link with here ...
             *      }
             *      );
             *  }
             * }
             */
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            Definitions.Add("__GVOICE_MAC__");
        }

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            PrivateIncludePaths.Add("GVoiceSDK/Public/GVoice/");

            string OSVersion = (Target.Platform == UnrealTargetPlatform.Win32) ? "x86" : "x64";
            GVoiceLibPath = Path.Combine(GVoiceThirdPartyDir, OSVersion, "lib");
            PublicLibraryPaths.Add(GVoiceLibPath);
            Console.WriteLine("GVoiceLibPath:" + GVoiceLibPath);

            PublicAdditionalLibraries.Add("GCloudVoice.lib");
            PublicDelayLoadDLLs.Add("GCloudVoice.dll");
            RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(GVoiceLibPath, "GCloudVoice.dll")));


            string binariesDir = Path.Combine(PluginPath, "Binaries", Target.Platform.ToString());
            //string filename = Path.GetFileName(Filepath);
            string dllPath = Path.Combine(GVoiceLibPath, "GCloudVoice.dll");
            System.Console.WriteLine("src dll=" + dllPath + " dst dir=" + binariesDir);
            if (!Directory.Exists(binariesDir))
            {
                Directory.CreateDirectory(binariesDir);
            }
            try
            {
                File.Copy(dllPath, Path.Combine(ModuleDirectory, "../../../../Binaries", Target.Platform.ToString(), "GCloudVoice.dll"), true);
            }
            catch (Exception e)
            {
                System.Console.WriteLine("copy dll exception,maybe have exists,err=", e.ToString());
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string ArchDir = "armeabi-v7a";
            //BASE
            string libDir = ("Android/GCloudVoice/libs");
            GVoiceLibPath = Path.Combine(Path.Combine(GVoiceThirdPartyDir, libDir), ArchDir);
            System.Console.WriteLine("--------------Android GCloudLibPath = " + GVoiceLibPath);
            PublicLibraryPaths.Add(GVoiceLibPath);
            AddGVoiceLib(Target, "GCloudVoice");
            //AddGCloudLib(Target, "TDataMaster");
            //AddGCloudLib(Target, "gcloud");

            //File srcFile = new File();

            // cz
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            GVoiceLibPath = GVoiceThirdPartyDir;//
            string strLib = GVoiceLibPath + "/Mac/libGCloudVoice.a";
            PublicAdditionalLibraries.Add(strLib);
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            GVoiceLibPath = GVoiceThirdPartyDir;
            string strLib = GVoiceLibPath + "/iOS/libGCloudVoice.a";
            PublicAdditionalLibraries.Add(strLib);
            string strBundle = GVoiceLibPath + "/iOS/GCloudVoice.bundle";

            AdditionalBundleResources.Add(new UEBuildBundleResource("../ThirdParty/GVoiceSDKLibrary/iOS/GCloudVoice.bundle", bInShouldLog: false));

            System.Console.WriteLine("---framework path:" + Path.Combine(GVoiceLibPath, "VoiceFrameWork.embeddedframework.zip"));

            //PublicAdditionalFrameworks.Add(new UEBuildFramework("VoiceFWForBundle", "../ThirdParty/GVoiceSDKLibrary/iOS/VoiceFWForBundle.embeddedframework.zip", "iOS/GCloudVoice.bundle"));

            PublicAdditionalLibraries.AddRange(
                new string[] {
                "stdc++.6.0.9",
                //"libstdc++.6.0.9.tbd","libz.tbd","libc++.tbd","libz.1.1.3.tbd","libsqlite3.tbd","libxml2.tbd",
                //Path.Combine(GVoiceThirdPartyDir, "libAPMidasInterface.a")
            });


            // These are iOS system libraries that Facebook depends on (FBAudienceNetwork, FBNotifications)
            PublicFrameworks.AddRange(
                new string[] {
                "AVFoundation",
                "CoreTelephony",
                "Security",
                "SystemConfiguration",
                "AudioToolbox",
                "CoreAudio",
                "Foundation",
            });
            //AddGVoiceLib(Target, "libGCloudVoice.a");



            /*
             * PublicAdditionalFrameworks.Add(new UEBuildFramework("ABase", Path.Combine(GCloudThirdPartyDir, "iOS/ABase.embeddedframework.zip")));
             */
        }
    }
Exemple #23
0
    public SpatialGDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage            = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        bFasterWithoutUnity = true;

        PrivateIncludePaths.Add("SpatialGDK/Private");

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

        if (Target.bBuildEditor)
        {
            PublicDependencyModuleNames.Add("UnrealEd");
            PublicDependencyModuleNames.Add("SpatialGDKServices");
        }

        if (Target.bWithPerfCounters)
        {
            PublicDependencyModuleNames.Add("PerfCounters");
        }

        var WorkerLibraryDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Binaries", "ThirdParty", "Improbable", Target.Platform.ToString()));

        string LibPrefix       = "";
        string ImportLibSuffix = "";
        string SharedLibSuffix = "";
        bool   bAddDelayLoad   = false;

        switch (Target.Platform)
        {
        case UnrealTargetPlatform.Win32:
        case UnrealTargetPlatform.Win64:
            ImportLibSuffix = ".lib";
            SharedLibSuffix = ".dll";
            bAddDelayLoad   = true;
            break;

        case UnrealTargetPlatform.Mac:
            LibPrefix       = "lib";
            ImportLibSuffix = SharedLibSuffix = ".dylib";
            break;

        case UnrealTargetPlatform.Linux:
            LibPrefix       = "lib";
            ImportLibSuffix = SharedLibSuffix = ".so";
            break;

        case UnrealTargetPlatform.PS4:
            LibPrefix       = "lib";
            ImportLibSuffix = "_stub.a";
            SharedLibSuffix = ".prx";
            bAddDelayLoad   = true;
            break;

        case UnrealTargetPlatform.XboxOne:
            ImportLibSuffix = ".lib";
            SharedLibSuffix = ".dll";
            // We don't set bAddDelayLoad = true here, because we get "unresolved external symbol __delayLoadHelper2".
            // See: https://www.fmod.org/questions/question/deploy-issue-on-xboxone-with-unrealengine-4-14/
            break;

        case UnrealTargetPlatform.IOS:
            LibPrefix       = "lib";
            ImportLibSuffix = SharedLibSuffix = "_static_fullylinked.a";
            break;

        default:
            throw new System.Exception(System.String.Format("Unsupported platform {0}", Target.Platform.ToString()));
        }

        string WorkerImportLib = System.String.Format("{0}worker{1}", LibPrefix, ImportLibSuffix);
        string WorkerSharedLib = System.String.Format("{0}worker{1}", LibPrefix, SharedLibSuffix);

        PublicAdditionalLibraries.AddRange(new[] { Path.Combine(WorkerLibraryDir, WorkerImportLib) });
        PublicLibraryPaths.Add(WorkerLibraryDir);
        RuntimeDependencies.Add(Path.Combine(WorkerLibraryDir, WorkerSharedLib), StagedFileType.NonUFS);
        if (bAddDelayLoad)
        {
            PublicDelayLoadDLLs.Add(WorkerSharedLib);
        }
    }
    public XunFei_AIUI(ReadOnlyTargetRules Target) : base(Target)
    {
        // We want to distribute binaries-only, not source.
        bOutputPubliclyDistributable = true;

        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        bEnableUndefinedIdentifierWarnings = false;
        PublicIncludePaths.AddRange(
            new string[] {
            // ... add public include paths required here ...
        }
            );


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


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "InputCore",
            "Json",
            "Projects",
            "UMG",
            "Slate",
            "SlateCore",

            // ... add other public dependencies that you statically link with here ...
        }
            );

        PrivateIncludePaths.Add("XunFei_iat/Private");
        PublicIncludePaths.Add("XunFei_iat/Public");

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

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicIncludePaths.AddRange(
                new string[]
            {
                Path.Combine(XunFeiPath, "include"),
            }
                );
            //PublicLibraryPaths.AddRange(
            //    new string[]
            //    {
            //        Path.Combine(XunFeiPath, "libs"),
            //    }
            //);

            string libPath = Path.Combine(XunFeiPath, "libs");

            PublicAdditionalLibraries.AddRange(new string[] { Path.Combine(libPath, "msc_x64.lib") });
            PublicAdditionalLibraries.AddRange(new string[] { Path.Combine(libPath, "aiui_x64.lib") });

            //RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(XunFeiPath, "msc_x64.dll")));
            CopyToBinaries(Path.Combine(XunFeiPath, "bin", "aiui_x64.dll"), Target);
        }

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );
    }
        public IOSApsalar(TargetInfo Target)
        {
            BinariesSubFolder = "NotForLicensees";

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

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

            PublicIncludePathModuleNames.Add("Analytics");

            PublicFrameworks.AddRange(
                new string[] {
                "CoreTelephony",
                "SystemConfiguration",
                "UIKit",
                "Foundation",
                "CoreGraphics",
                "MobileCoreServices",
                "StoreKit",
                "CFNetwork",
                "CoreData",
                "Security",
                "CoreLocation"
            });

            PublicAdditionalLibraries.AddRange(
                new string[] {
                "sqlite3",
                "z"
            });

            bool bHasApsalarSDK =
                (System.IO.Directory.Exists(System.IO.Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "Apsalar")) &&
                 System.IO.Directory.Exists(System.IO.Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "Apsalar", "IOS"))) ||
                (System.IO.Directory.Exists(System.IO.Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "NotForLicensees")) &&
                 System.IO.Directory.Exists(System.IO.Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "NotForLicensees", "Apsalar")) &&
                 System.IO.Directory.Exists(System.IO.Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "NotForLicensees", "Apsalar", "IOS")));

            if (bHasApsalarSDK)
            {
                PublicIncludePaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "NotForLicensees/Apsalar/IOS/");
                PublicAdditionalLibraries.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "NotForLicensees/Apsalar/IOS/libApsalar.a");

                Definitions.Add("WITH_APSALAR=1");
            }
            else
            {
                Definitions.Add("WITH_APSALAR=0");
            }
        }
Exemple #26
0
        public GameAnalytics(TargetInfo Target)
#endif
        {
            PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

            var GameAnalyticsPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../ThirdParty/"));
            var libPath           = Path.Combine(GameAnalyticsPath, "lib");

            // Test plugin analytics in editor mode
            PublicDefinitions.Add("TEST_NON_EDITOR_PLUGIN_ANALYTICS_MODE=0");

            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win64:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win64", "GameAnalytics.lib"));
                PrivateDependencyModuleNames.AddRange(new string[] { "OpenSSL", "libcurl" });
                break;

            case UnrealTargetPlatform.Win32:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "win32", "GameAnalytics.lib"));
                PrivateDependencyModuleNames.AddRange(new string[] { "OpenSSL", "libcurl" });
                break;

            case UnrealTargetPlatform.Android:
                PrivateDependencyModuleNames.Add("Launch");
                PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private/Android"));
                break;

            case UnrealTargetPlatform.Mac:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "osx", "libGameAnalytics.a"));
                PublicAdditionalLibraries.Add("curl");
                PublicFrameworks.AddRange(
                    new string[] {
                    "CoreFoundation",
                    "Foundation",
                    "CoreServices"
                }
                    );
                PrivateDependencyModuleNames.AddRange(new string[] { "OpenSSL" });
                break;

            case UnrealTargetPlatform.Linux:
                LoadLibrary(Path.Combine(libPath, "linux"), "libGameAnalytics.a");
                //PublicAdditionalLibraries.Add(Path.Combine(libPath, "linux", "libGameAnalytics.a"));
                //RuntimeDependencies.Add(Path.Combine(libPath, "linux", "libGameAnalytics.a"));
                PrivateDependencyModuleNames.AddRange(new string[] { "OpenSSL", "libcurl" });
                break;

            case UnrealTargetPlatform.IOS:
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "ios", "libGameAnalytics.a"));
                PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private/IOS"));
                PublicFrameworks.AddRange(
                    new string[] {
                    "AdSupport",
                    "SystemConfiguration"
                }
                    );

                PublicAdditionalLibraries.AddRange(
                    new string[] {
                    "sqlite3",
                    "z",
                    "c++"
                });
                break;

            case UnrealTargetPlatform.HTML5:
                if (Target.Architecture != "-win32")
                {
                    PublicAdditionalLibraries.Add(Path.Combine(libPath, "html5", "GameAnalytics.jspre"));
                    PublicAdditionalLibraries.Add(Path.Combine(libPath, "html5", "GameAnalyticsUnreal.js"));
                }
                break;

            case UnrealTargetPlatform.XboxOne:
            case UnrealTargetPlatform.PS4:
            default:
                throw new NotImplementedException("This target platform is not configured for GameAnalytics SDK: " + Target.Platform.ToString());
            }

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

            PrivateIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "Private")));
            PrivateIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "Public")));
            PublicIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "Public")));


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

            if (Target.Platform == UnrealTargetPlatform.HTML5)
            {
                PrivateDependencyModuleNames.AddRange(
                    new string[]
                {
                    "Json"
                }
                    );

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

            PublicIncludePathModuleNames.AddRange(
                new string[]
            {
                "Analytics",
                "Engine"
            }
                );

            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "GameAnalytics_APL.xml"));
            }
        }
Exemple #27
0
    public MidiInterface(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicIncludePaths.AddRange(
            new string[] {
            "MidiInterface/Public"
        }
            );


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


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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject", "Engine", "Slate", "SlateCore", "Midi"
        }
            );


        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            Definitions.Add("__WINDOWS_MM__=1");
            PublicAdditionalLibraries.Add("winmm.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS)
        {
            Definitions.Add("__MACOSX_CORE__=1");
            PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple" });

            if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Mac" });
            }
            else
            {
                PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/IOS" });
            }

            PublicFrameworks.AddRange(new string[]
            {
                "CoreMIDI", "CoreAudio", "CoreFoundation"
            });
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            Definitions.Add("__LINUX_ALSA__=1");

            PublicIncludePaths.Add("Runtime/Core/Public/Linux");

            PublicAdditionalLibraries.AddRange(
                new string[]
            {
                "libasound2.so", "libpthread.so"
            });
        }
    }
Exemple #28
0
    public ARToolkit(TargetInfo Target)
    {
        Type = ModuleType.External;

        string SDKDIR = Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name));

        SDKDIR = SDKDIR.Replace("\\", "/");
        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicIncludePaths.Add(SDKDIR + "/include/OSX/");
            string LibPath = SDKDIR + "/lib/OSX/";

            PublicAdditionalLibraries.Add(LibPath + "macosx-universal/libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARICP.a");
            PublicAdditionalLibraries.Add(LibPath + "libKPM.a");
            PublicAdditionalLibraries.Add(LibPath + "libARUtil.a");
            PublicAdditionalLibraries.Add(LibPath + "libARMulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libARvideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libEden.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_lite.a");

            PublicFrameworks.AddRange(
                new string[] {
                "QTKit",
                "CoreVideo",
                "Accelerate"
            }
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicIncludePaths.Add(SDKDIR + "/include/iOS/");
            string LibPath = SDKDIR + "/lib/iOS/";

            PublicAdditionalLibraries.Add(LibPath + "libKPM.a");
            PublicAdditionalLibraries.Add(LibPath + "ios511/libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR.a");
            PublicAdditionalLibraries.Add(LibPath + "libARVideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARICP.a");
            PublicAdditionalLibraries.Add(LibPath + "libARUtil.a");
            PublicAdditionalLibraries.Add(LibPath + "libARMulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libARvideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libEden.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_es.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_es2.a");
            PublicAdditionalLibraries.Add(LibPath + "libc++.dylib"); //Need this from IOS SDK

            PublicFrameworks.AddRange(
                new string[] {
                "CoreVideo",
                "Accelerate",
                "AVFoundation"
            }
                );
        }
        else if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicIncludePaths.Add(SDKDIR + "/include/Windows/");

            string LibPath;

            switch (WindowsPlatform.Compiler)
            {
            case WindowsCompiler.VisualStudio2015:
                LibPath = SDKDIR + "/lib/Win64/vs2015";
                break;

            case WindowsCompiler.VisualStudio2013:
                LibPath = SDKDIR + "/lib/Win64/vs2013";
                break;

            default:
                throw new BuildException("Unexpected compiler version on Visual Studio 2013 / 2015 is supported!");
            }


            PublicLibraryPaths.Add(LibPath);
            PublicAdditionalLibraries.AddRange(
                new string[] {
                "libjpeg.lib",
                "pthreadVC2.lib",
                "ARUtil.lib",
                "AR.lib",
                "ARMulti.lib",
                "AR2.lib",
                "KPM.lib",
                "ARvideo.lib",
                "ARICP.lib"
            }
                );

            PublicDelayLoadDLLs.AddRange(new string[] { "DSVL.dll", "ARvideo.dll", "pthreadVC2.dll" });
            RuntimeDependencies.Add(new RuntimeDependency(SDKDIR + "/../../../Binaries/Win64/DSVL.dll"));
            RuntimeDependencies.Add(new RuntimeDependency(SDKDIR + "/../../../Binaries/Win64/ARvideo.dll"));
            RuntimeDependencies.Add(new RuntimeDependency(SDKDIR + "/../../../Binaries/Win64/pthreadVC2.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add(SDKDIR + "/include/Android/");
            string LibPathAndroid = SDKDIR + "/lib/Android/armeabi-v7a/";
            PublicLibraryPaths.Add(LibPathAndroid);

            PublicAdditionalLibraries.Add(LibPathAndroid + "libar.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libar2.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libaricp.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libkpm.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libutil.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libarmulti.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libjpeg.a");

            PublicAdditionalLibraries.Add(LibPathAndroid + "libc++_shared.so");
        }
    }
Exemple #29
0
    public SpatialGDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage            = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        bFasterWithoutUnity = true;

        PrivateIncludePaths.Add("SpatialGDK/Private");

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

        // Check if we're building in the editor.
        if (Target.bBuildEditor)
        {
            // Required by USpatialGameInstance::StartPlayInEditorGameInstance.
            PublicDependencyModuleNames.Add("UnrealEd");
        }

        var CoreSdkLibraryDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Binaries", "ThirdParty", "Improbable", Target.Platform.ToString()));

        string LibPrefix       = "";
        string ImportLibSuffix = "";
        string SharedLibSuffix = "";
        bool   bAddDelayLoad   = false;

        switch (Target.Platform)
        {
        case UnrealTargetPlatform.Win32:
        case UnrealTargetPlatform.Win64:
            ImportLibSuffix = ".lib";
            SharedLibSuffix = ".dll";
            bAddDelayLoad   = true;
            break;

        case UnrealTargetPlatform.Mac:
            LibPrefix       = "lib";
            ImportLibSuffix = SharedLibSuffix = ".dylib";
            break;

        case UnrealTargetPlatform.Linux:
            LibPrefix       = "lib";
            ImportLibSuffix = SharedLibSuffix = ".so";
            break;

        case UnrealTargetPlatform.PS4:
            LibPrefix       = "lib";
            ImportLibSuffix = "_stub.a";
            SharedLibSuffix = ".prx";
            bAddDelayLoad   = true;
            break;

        case UnrealTargetPlatform.XboxOne:
            ImportLibSuffix = ".lib";
            SharedLibSuffix = ".dll";
            break;

        case UnrealTargetPlatform.IOS:
            LibPrefix       = "lib";
            ImportLibSuffix = SharedLibSuffix = "_static_fullylinked.a";
            break;

        default:
            throw new System.Exception(System.String.Format("Unsupported platform {0}", Target.Platform.ToString()));
        }

        string CoreSdkImportLib = System.String.Format("{0}worker{1}", LibPrefix, ImportLibSuffix);
        string CoreSdkSharedLib = System.String.Format("{0}worker{1}", LibPrefix, SharedLibSuffix);

        PublicAdditionalLibraries.AddRange(new[] { Path.Combine(CoreSdkLibraryDir, CoreSdkImportLib) });
        RuntimeDependencies.Add(Path.Combine(CoreSdkLibraryDir, CoreSdkSharedLib), StagedFileType.NonUFS);
        PublicLibraryPaths.Add(CoreSdkLibraryDir);
        if (bAddDelayLoad)
        {
            PublicDelayLoadDLLs.Add(CoreSdkSharedLib);
        }

        // Point generated code to the correct API spec.
        PublicDefinitions.Add("IMPROBABLE_DLL_API=SPATIALGDK_API");
    }
    public Facebook(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        // Additional Frameworks and Libraries for Android found in OnlineSubsystemFacebook_UPL.xml
        if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            Definitions.Add("WITH_FACEBOOK=1");
            Definitions.Add("UE4_FACEBOOK_VER=4.18");

            // These are iOS system libraries that Facebook depends on (FBAudienceNetwork, FBNotifications)
            PublicFrameworks.AddRange(
                new string[] {
                "ImageIO"
            });

            // More dependencies for Facebook (FBAudienceNetwork, FBNotifications)
            PublicAdditionalLibraries.AddRange(
                new string[] {
                "xml2"
            });

            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "AccountKit",
                    "IOS/FacebookSDK/AccountKit.embeddedframework.zip",
                    "AccountKit.framework/AccountKitAdditionalStrings.bundle"
                    )
                );

            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "AccountKit",
                    "IOS/FacebookSDK/AccountKit.embeddedframework.zip",
                    "AccountKit.framework/AccountKitStrings.bundle"
                    )
                );

            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "Bolts",
                    "IOS/FacebookSDK/Bolts.embeddedframework.zip"
                    )
                );

            // Add the FBAudienceNetwork framework
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "FBAudienceNetwork",
                    "IOS/FacebookSDK/FBAudienceNetwork.embeddedframework.zip"
                    )
                );

            // Access to Facebook notifications
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "FBNotifications",
                    "IOS/FacebookSDK/FBNotifications.embeddedframework.zip"
                    )
                );

            // Access to Facebook core
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "FBSDKCoreKit",
                    "IOS/FacebookSDK/FBSDKCoreKit.embeddedframework.zip",
                    "FBSDKCoreKit.framework/Resources/FacebookSDKStrings.bundle"
                    )
                );

            // Access to Facebook login
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "FBSDKLoginKit",
                    "IOS/FacebookSDK/FBSDKLoginKit.embeddedframework.zip"
                    )
                );

            // Access to Facebook messenger sharing
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "FBSDKMessengerShareKit",
                    "IOS/FacebookSDK/FBSDKMessengerShareKit.embeddedframework.zip"
                    )
                );

            // Access to Facebook sharing
            PublicAdditionalFrameworks.Add(
                new UEBuildFramework(
                    "FBSDKShareKit",
                    "IOS/FacebookSDK/FBSDKShareKit.embeddedframework.zip"
                    )
                );
        }
    }