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", } ); } PublicIncludePaths.AddRange( new string[] { UEBuildConfiguration.UEThirdPartySourceDirectory + "openexr/Deploy/include", } ); } }
public ICU(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; bool bNeedsDlls = false; string ICUVersion = "icu4c-53_1"; string ICURootPath = Target.UEThirdPartySourceDirectory + "ICU/" + ICUVersion + "/"; // Includes PublicSystemIncludePaths.Add(ICURootPath + "include" + "/"); string PlatformFolderName = Target.Platform.ToString(); string TargetSpecificPath = ICURootPath + PlatformFolderName + "/"; if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { TargetSpecificPath = ICURootPath + "Linux/"; } // make all Androids use the Android directory if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android)) { TargetSpecificPath = ICURootPath + "Android/"; } if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { string VSVersionFolderName = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); TargetSpecificPath += VSVersionFolderName + "/"; string[] LibraryNameStems = { "dt", // Data "uc", // Unicode Common "in", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; // Library Paths PublicLibraryPaths.Add(TargetSpecificPath + "lib" + "/"); EICULinkType ICULinkType = (Target.LinkType == TargetLinkType.Monolithic)? EICULinkType.Static : EICULinkType.Dynamic; switch (ICULinkType) { case EICULinkType.Static: foreach (string Stem in LibraryNameStems) { string LibraryName = "sicu" + Stem + LibraryNamePostfix + "." + "lib"; PublicAdditionalLibraries.Add(LibraryName); } break; case EICULinkType.Dynamic: foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix + "." + "lib"; PublicAdditionalLibraries.Add(LibraryName); } foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix + "53" + "." + "dll"; PublicDelayLoadDLLs.Add(LibraryName); } if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32) { string BinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/VS{2}/", ICUVersion, Target.Platform.ToString(), Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string Stem in LibraryNameStems) { string LibraryName = BinariesDir + String.Format("icu{0}{1}53.dll", Stem, LibraryNamePostfix); RuntimeDependencies.Add(LibraryName); } } bNeedsDlls = true; break; } } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix) || Target.IsInPlatformGroup(UnrealPlatformGroup.Android)) { string StaticLibraryExtension = "a"; if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { TargetSpecificPath += Target.Architecture + "/"; } else { PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib"); PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib"); PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib"); PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib"); } string[] LibraryNameStems = { "data", // Data "uc", // Unicode Common "i18n", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; // Library Paths // Temporarily? only link statically on Linux too //EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic; EICULinkType ICULinkType = EICULinkType.Static; switch (ICULinkType) { case EICULinkType.Static: foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix; if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { // Linux needs the path, not just the filename, to avoid linking to system lib instead of a bundled one. PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension); } else { // other platforms will just use the library name PublicAdditionalLibraries.Add(LibraryName); } } break; case EICULinkType.Dynamic: if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { string PathToBinary = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/{2}/", ICUVersion, Target.Platform.ToString(), Target.Architecture); foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix; string LibraryPath = Target.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/"; PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryName); // add runtime dependencies (for staging) RuntimeDependencies.Add(PathToBinary + "lib" + LibraryName + ".so"); RuntimeDependencies.Add(PathToBinary + "lib" + LibraryName + ".so.53"); // version-dependent } } break; } } else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS) { string StaticLibraryExtension = "a"; string DynamicLibraryExtension = "dylib"; string[] LibraryNameStems = { "data", // Data "uc", // Unicode Common "i18n", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.IOS || (Target.LinkType == TargetLinkType.Monolithic)) ? EICULinkType.Static : EICULinkType.Dynamic; // Library Paths switch (ICULinkType) { case EICULinkType.Static: foreach (string Stem in LibraryNameStems) { string LibraryName = "libicu" + Stem + LibraryNamePostfix + "." + StaticLibraryExtension; PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + LibraryName); } break; case EICULinkType.Dynamic: foreach (string Stem in LibraryNameStems) { if (Target.Platform == UnrealTargetPlatform.Mac) { string LibraryName = "libicu" + Stem + ".53.1" + LibraryNamePostfix + "." + DynamicLibraryExtension; string LibraryPath = Target.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName; PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(LibraryPath); } } bNeedsDlls = true; break; } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { // we don't bother with debug libraries on HTML5. Mainly because debugging isn't viable on html5 currently string StaticLibraryExtension = "bc"; string[] LibraryNameStems = { "data", // Data "uc", // Unicode Common "i18n", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string OpimizationSuffix = ""; if (Target.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } foreach (string Stem in LibraryNameStems) { string LibraryName = "libicu" + Stem + OpimizationSuffix + "." + StaticLibraryExtension; PublicAdditionalLibraries.Add(TargetSpecificPath + LibraryName); } } else if (Target.Platform == UnrealTargetPlatform.PS4) { string LibraryNamePrefix = "sicu"; string[] LibraryNameStems = { "dt", // Data "uc", // Unicode Common "in", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug) ? "d" : string.Empty; string LibraryExtension = "lib"; foreach (string Stem in LibraryNameStems) { string LibraryName = ICURootPath + "PS4/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension; PublicAdditionalLibraries.Add(LibraryName); } } else if (Target.Platform == UnrealTargetPlatform.Switch) { string LibraryNamePrefix = "sicu"; string[] LibraryNameStems = { "dt", // Data "uc", // Unicode Common "in", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = ""; //(Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; string LibraryExtension = "a"; foreach (string Stem in LibraryNameStems) { string LibraryName = ICURootPath + "Switch/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension; PublicAdditionalLibraries.Add(LibraryName); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Use reflection to allow type not to exist if console code is not present System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool"); if (XboxOnePlatformType != null) { string LibraryNamePrefix = "sicu"; string[] LibraryNameStems = { "dt", // Data "uc", // Unicode Common "in", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; string LibraryExtension = "lib"; foreach (string Stem in LibraryNameStems) { System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null); string LibraryName = ICURootPath + "XboxOne/VS" + VersionName.ToString() + "/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension; PublicAdditionalLibraries.Add(LibraryName); } } } // common defines (this used to be inside an if TargetPlatform == ___ block that looked to include every platform known to man, so just removed the if) // Definitions PublicDefinitions.Add("U_USING_ICU_NAMESPACE=0"); // Disables a using declaration for namespace "icu". PublicDefinitions.Add("U_STATIC_IMPLEMENTATION"); // Necessary for linking to ICU statically. PublicDefinitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit"); // Makes UnicodeString constructors for ICU character types explicit. PublicDefinitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit. PublicDefinitions.Add("UCONFIG_NO_TRANSLITERATION=1"); // Disables declarations and compilation of unused ICU transliteration functionality. if (Target.Platform == UnrealTargetPlatform.PS4) { // Definitions PublicDefinitions.Add("ICU_NO_USER_DATA_OVERRIDE=1"); PublicDefinitions.Add("U_PLATFORM=U_PF_ORBIS"); } if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Definitions PublicDefinitions.Add("ICU_NO_USER_DATA_OVERRIDE=1"); PublicDefinitions.Add("U_PLATFORM=U_PF_DURANGO"); } PublicDefinitions.Add("NEEDS_ICU_DLLS=" + (bNeedsDlls ? "1" : "0")); }
public FBX(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string FBXSDKDir = Target.UEThirdPartySourceDirectory + "FBX/2018.1.1/"; PublicSystemIncludePaths.AddRange( new string[] { FBXSDKDir + "include", FBXSDKDir + "include/fbxsdk", } ); if (Target.Platform == UnrealTargetPlatform.Win64) { string FBxLibPath = FBXSDKDir + "lib/vs" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/"; FBxLibPath += "x64/release/"; PublicLibraryPaths.Add(FBxLibPath); if (Target.LinkType != TargetLinkType.Monolithic) { PublicAdditionalLibraries.Add("libfbxsdk.lib"); // We are using DLL versions of the FBX libraries PublicDefinitions.Add("FBXSDK_SHARED"); RuntimeDependencies.Add("$(EngineDir)/Binaries/Win64/libfbxsdk.dll"); } else { if (Target.bUseStaticCRT) { PublicAdditionalLibraries.Add("libfbxsdk-mt.lib"); } else { PublicAdditionalLibraries.Add("libfbxsdk-md.lib"); } } } else if (Target.Platform == UnrealTargetPlatform.Mac) { string LibDir = FBXSDKDir + "lib/clang/release/"; PublicAdditionalLibraries.Add(LibDir + "libfbxsdk.dylib"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { string LibDir = FBXSDKDir + "lib/gcc4/" + Target.Architecture + "/release/"; if (!Directory.Exists(LibDir)) { string Err = string.Format("FBX SDK not found in {0}", LibDir); System.Console.WriteLine(Err); throw new BuildException(Err); } PublicAdditionalLibraries.Add(LibDir + "/libfbxsdk.a"); /* There is a bug in fbxarch.h where is doesn't do the check * for clang under linux */ PublicDefinitions.Add("FBXSDK_COMPILER_CLANG"); // libfbxsdk has been built against libstdc++ and as such needs this library PublicAdditionalLibraries.Add("stdc++"); } }
public VulkanRHI(ReadOnlyTargetRules Target) : base(Target) { bOutputPubliclyDistributable = true; PrivateIncludePaths.Add("Runtime/VulkanRHI/Private"); if (Target.Platform == UnrealTargetPlatform.Android) { PrivateIncludePaths.Add("Runtime/VulkanRHI/Private/Android"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PrivateIncludePaths.Add("Runtime/VulkanRHI/Private/Linux"); } else if (Target.Platform == UnrealTargetPlatform.Quail) { PrivateIncludePaths.Add("Runtime/VulkanRHI/Private/Quail"); } else if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { PrivateIncludePaths.Add("Runtime/VulkanRHI/Private/Windows"); } PrivateDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "ShaderCore", "UtilityShaders", "HeadMountedDisplay", } ); if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { string VulkanSDKPath = Environment.GetEnvironmentVariable("VULKAN_SDK"); bool bSDKInstalled = !String.IsNullOrEmpty(VulkanSDKPath); bool bUseThirdParty = true; if (bSDKInstalled) { // Check if the installed SDK is newer or the same than the provided headers distributed with the Engine int ThirdPartyVersion = GetThirdPartyVersion(); int SDKVersion = GetSDKVersion(VulkanSDKPath); if (SDKVersion >= ThirdPartyVersion) { // If the user has an installed SDK, use that instead PrivateIncludePaths.Add(VulkanSDKPath + "/Include"); // Older SDKs have an extra subfolder PrivateIncludePaths.Add(VulkanSDKPath + "/Include/vulkan"); bUseThirdParty = false; } } if (bUseThirdParty) { AddEngineThirdPartyPrivateStaticDependencies(Target, "Vulkan"); } } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { if (Target.Platform == UnrealTargetPlatform.Linux) { AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2"); string VulkanSDKPath = Environment.GetEnvironmentVariable("VULKAN_SDK"); bool bSDKInstalled = !String.IsNullOrEmpty(VulkanSDKPath); if (BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Linux || !bSDKInstalled) { AddEngineThirdPartyPrivateStaticDependencies(Target, "Vulkan"); } else { PrivateIncludePaths.Add(VulkanSDKPath + "/include"); PrivateIncludePaths.Add(VulkanSDKPath + "/include/vulkan"); PublicLibraryPaths.Add(VulkanSDKPath + "/lib"); PublicAdditionalLibraries.Add("vulkan"); } } else { AddEngineThirdPartyPrivateStaticDependencies(Target, "VkHeadersExternal"); } } else if (Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.Mac) { string VulkanSDKPath = Environment.GetEnvironmentVariable("VULKAN_SDK"); bool bHaveVulkan = false; if (Target.Platform == UnrealTargetPlatform.Android) { // Note: header is the same for all architectures so just use arch-arm string NDKPath = Environment.GetEnvironmentVariable("NDKROOT"); string NDKVulkanIncludePath = NDKPath + "/platforms/android-24/arch-arm/usr/include/vulkan"; // Use NDK Vulkan header if discovered, or VulkanSDK if available if (File.Exists(NDKVulkanIncludePath + "/vulkan.h")) { bHaveVulkan = true; PrivateIncludePaths.Add(NDKVulkanIncludePath); } else if (!String.IsNullOrEmpty(VulkanSDKPath)) { // If the user has an installed SDK, use that instead bHaveVulkan = true; PrivateIncludePaths.Add(VulkanSDKPath + "/Include/vulkan"); } else { // Fall back to the Windows Vulkan SDK (the headers are the same) bHaveVulkan = true; PrivateIncludePaths.Add(Target.UEThirdPartySourceDirectory + "Vulkan/Windows/Include/vulkan"); } } else if (!String.IsNullOrEmpty(VulkanSDKPath)) { bHaveVulkan = true; PrivateIncludePaths.Add(VulkanSDKPath + "/Include"); } if (bHaveVulkan) { if (Target.Configuration != UnrealTargetConfiguration.Shipping) { PrivateIncludePathModuleNames.AddRange( new string[] { "TaskGraph", } ); } } else { PrecompileForTargets = PrecompileTargetsType.None; } } else { PrecompileForTargets = PrecompileTargetsType.None; } }
// public Funapi(TargetInfo Target) // <= 4.15 public Funapi(ReadOnlyTargetRules Target) : base(Target) // >= 4.16 { PublicDefinitions.Add("WITH_FUNAPI=1"); PublicDefinitions.Add("FUNAPI_UE4=1"); PublicDefinitions.Add("FUNAPI_HAVE_ZLIB=1"); PublicDefinitions.Add("FUNAPI_HAVE_DELAYED_ACK=1"); PublicDefinitions.Add("FUNAPI_HAVE_TCP_TLS=1"); PublicDefinitions.Add("FUNAPI_HAVE_WEBSOCKET=1"); if (Target.Platform == UnrealTargetPlatform.PS4) { PublicDefinitions.Add("FUNAPI_HAVE_RPC=0"); } else { PublicDefinitions.Add("FUNAPI_HAVE_RPC=1"); } if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { PublicDefinitions.Add("FUNAPI_PLATFORM_WINDOWS=1"); PublicDefinitions.Add("FUNAPI_UE4_PLATFORM_WINDOWS=1"); } if (Target.Platform == UnrealTargetPlatform.Linux) { PublicDefinitions.Add("FUNAPI_HAVE_ZSTD=0"); PublicDefinitions.Add("FUNAPI_HAVE_SODIUM=0"); PublicDefinitions.Add("FUNAPI_HAVE_AES128=0"); } else { PublicDefinitions.Add("FUNAPI_HAVE_ZSTD=1"); PublicDefinitions.Add("FUNAPI_HAVE_SODIUM=1"); if (Target.Platform == UnrealTargetPlatform.Android) { PublicDefinitions.Add("FUNAPI_HAVE_AES128=0"); } else { PublicDefinitions.Add("FUNAPI_HAVE_AES128=1"); } } PublicIncludePaths.AddRange( new string[] { // NOTE(sungjin): Path를 문자열로 넘겨주지 않고 // Path.Combine(ModuleDirectory,"Path") 을 사용한다. // 엔진이 플러그인의 Public, Private 폴더를 자동으로 추가해 주지만 // 잘못된 경로를 추가하는 현상이 있어 // Path.Combine 함수를 통해 명시적으로 표현하도록 하여 우회한다. Path.Combine(ModuleDirectory, "Public"), Path.Combine(ModuleDirectory, "Public/funapi"), Path.Combine(ModuleDirectory, "Public/funapi/management"), Path.Combine(ModuleDirectory, "Public/funapi/network"), Path.Combine(ModuleDirectory, "Public/funapi/service"), //... add public include paths required here... } ); PrivateIncludePaths.AddRange( new string[] { //ModuleDirectory = real dicractory path where Funapi.Build.cs Path.Combine(ModuleDirectory, "Private"), //... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "Engine", "zlib", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); // definitions PublicDefinitions.Add("RAPIDJSON_HAS_STDSTRING=0"); PublicDefinitions.Add("RAPIDJSON_HAS_CXX11_RVALUE_REFS=0"); // definitions for zlib PublicDefinitions.Add("_LARGEFILE64_SOURCE=0"); PublicDefinitions.Add("_FILE_OFFSET_BITS=0"); // Third party library var ThirdPartyPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "ThirdParty/")); // include path PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include")); // library var LibPath = ThirdPartyPath; if (Target.Platform == UnrealTargetPlatform.Mac) { PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "Mac")); LibPath += "lib/Mac"; PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcurl.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libz.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libsodium.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libwebsockets.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libzstd.a")); } else if (Target.Platform == UnrealTargetPlatform.Win32) { PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "Windows", "x86")); LibPath += "lib/Windows/x86"; PublicLibraryPaths.Add(LibPath); PublicDefinitions.Add("CURL_STATICLIB=1"); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcurl_a.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libeay32.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libsodium.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "websockets_static.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libzstd_static.lib")); } else if (Target.Platform == UnrealTargetPlatform.Win64) { PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "Windows", "x64")); LibPath += "lib/Windows/x64"; PublicLibraryPaths.Add(LibPath); PublicDefinitions.Add("CURL_STATICLIB=1"); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcurl_a.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libsodium.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "websockets_static.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libzstd_static.lib")); } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicDefinitions.Add("FUNAPI_UE4_PLATFORM_ANDROID=1"); // toolchain will filter properly PublicIncludePaths.Add(LibPath + "include/Android/ARMv7"); PublicLibraryPaths.Add(LibPath + "lib/Android/ARMv7"); PublicIncludePaths.Add(LibPath + "include/Android/ARM64"); PublicLibraryPaths.Add(LibPath + "lib/Android/ARM64"); PublicAdditionalLibraries.Add("sodium"); PublicAdditionalLibraries.Add("curl"); PublicAdditionalLibraries.Add("ssl"); PublicAdditionalLibraries.Add("crypto"); PublicAdditionalLibraries.Add("websockets"); PublicAdditionalLibraries.Add("zstd"); } else if (Target.Platform == UnrealTargetPlatform.IOS) { PublicDefinitions.Add("WITH_HOT_RELOAD=0"); PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "iOS")); LibPath += "lib/iOS"; PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcurl.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libsodium.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libwebsockets.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libzstd.a")); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicDefinitions.Add("FUNAPI_UE4_PLATFORM_PS4=1"); PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "PS4")); LibPath += "lib/PS4"; PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libsodium.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libzstd_static.a")); PublicDependencyModuleNames.AddRange(new string[] { "WebSockets" }); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL", "libWebSockets"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicDefinitions.Add("FUNAPI_UE4_PLATFORM_LINUX=1"); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL", "libWebSockets", "libcurl"); } }
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", PythonHome, // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "Sockets", "Networking", "Projects" // ... 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 { 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" }); } if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { if (UseThirdPartyPython) { PythonHome = ThirdPartyPythonHome; System.Console.WriteLine("Using Embedded Python at: " + PythonHome); PublicIncludePaths.Add(PythonHome); string libPath = Path.Combine(PythonHome, "Lib", string.Format("{0}.lib", PythonType.ToLower())); System.Console.WriteLine("full lib path: " + libPath); PublicLibraryPaths.Add(Path.GetDirectoryName(libPath)); PublicAdditionalLibraries.Add(libPath); string dllPath = Path.Combine(BinariesPath, "Win64", string.Format("{0}.dll", PythonType.ToLower())); RuntimeDependencies.Add(dllPath); } else 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); } } //other platforms else { 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); PublicAdditionalLibraries.Add(Path.Combine(PythonHome, "Lib", string.Format("{0}.lib", PythonType))); } System.Console.WriteLine("Using Python at: " + PythonHome); PublicIncludePaths.Add(PythonHome); string libPath = GetMacPythonLibFile(PythonHome); PublicLibraryPaths.Add(Path.GetDirectoryName(libPath)); PublicDelayLoadDLLs.Add(libPath); } 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"); } PublicIncludePaths.Add(includesPath); PublicAdditionalLibraries.Add(libsPath); } else if (Target.Platform == UnrealTargetPlatform.Linux) { string[] items = PythonHome.Split(';'); PublicIncludePaths.Add(items[0]); PublicAdditionalLibraries.Add(items[1]); } } }
public UnrealTournament(TargetInfo Target) { bFasterWithoutUnity = true; MinFilesUsingPrecompiledHeaderOverride = 1; PrivateIncludePaths.AddRange(new string[] { "UnrealTournament/Private/Slate", "UnrealTournament/Private/Slate/Base", "UnrealTournament/Private/Slate/Dialogs", "UnrealTournament/Private/Slate/Menus", "UnrealTournament/Private/Slate/Panels", "UnrealTournament/Private/Slate/Toasts", "UnrealTournament/Private/Slate/Widgets", "UnrealTournament/Private/Slate/UIWindows", "UnrealTournament/ThirdParty/sqlite", }); if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add("UnrealTournament/ThirdParty/sqlite/Windows"); PublicAdditionalLibraries.Add("sqlite3.lib"); PublicAdditionalLibraries.Add("bcrypt.lib"); } DynamicallyLoadedModuleNames.AddRange( new string[] { "UTReplayStreamer", } ); PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "GameplayTasks", "AIModule", "OnlineSubsystem", "OnlineSubsystemUtils", "RenderCore", "Navmesh", "WebBrowser", "NetworkReplayStreaming", "InMemoryNetworkReplayStreaming", "Json", "JsonUtilities", "HTTP", "UMG", "Party", "Lobby", "Qos", "BlueprintContext", "EngineSettings", "Landscape", "Foliage", "PerfCounters", "PakFile", "UnrealTournamentFullScreenMovie" }); PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore", "FriendsAndChat", "Sockets", "Analytics", "AnalyticsET" }); if (Target.Type != TargetRules.TargetType.Server) { PublicDependencyModuleNames.AddRange(new string[] { "AppFramework", "RHI", "SlateRHIRenderer", "MoviePlayer" }); } if (Target.Type == TargetRules.TargetType.Editor) { PublicDependencyModuleNames.AddRange(new string[] { "UnrealEd", "SourceControl", "Matinee", "PropertyEditor", "ShaderCore" }); } CircularlyReferencedDependentModules.Add("BlueprintContext"); if (!IsLicenseeBuild()) { Definitions.Add("WITH_PROFILE=1"); Definitions.Add("WITH_SOCIAL=1"); PublicIncludePathModuleNames.Add("Social"); PublicDependencyModuleNames.AddRange( new string[] { "OnlineSubsystemMcp", "McpProfileSys", "UTMcpProfile", "Social", } ); } else { Definitions.Add("WITH_PROFILE=0"); Definitions.Add("WITH_SOCIAL=0"); PublicDependencyModuleNames.AddRange( new string[] { "GithubStubs", } ); } }
public Steamworks(TargetInfo Target) { /** Mark the current version of the Steam SDK */ string SteamVersion = "v132"; Type = ModuleType.External; string SdkBase = UEBuildConfiguration.UEThirdPartySourceDirectory + "Steamworks/Steam" + SteamVersion + "/sdk"; if (!Directory.Exists(SdkBase)) { string Err = string.Format("steamworks SDK not found in {0}", SdkBase); System.Console.WriteLine(Err); throw new BuildException(Err); } PublicIncludePaths.Add(SdkBase + "/public"); string LibraryPath = SdkBase + "/redistributable_bin/"; string LibraryName = "steam_api"; if (Target.Platform == UnrealTargetPlatform.Win32) { PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryName + ".lib"); PublicDelayLoadDLLs.Add(LibraryName + ".dll"); string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win32/", SteamVersion); RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steam_api.dll")); if (Target.Type == TargetRules.TargetType.Server) { RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steamclient.dll")); RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "tier0_s.dll")); RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "vstdlib_s.dll")); } } else if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(LibraryPath + "win64"); PublicAdditionalLibraries.Add(LibraryName + "64.lib"); PublicDelayLoadDLLs.Add(LibraryName + "64.dll"); string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win64/", SteamVersion); RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + LibraryName + "64.dll")); if (Target.Type == TargetRules.TargetType.Server) { RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steamclient64.dll")); RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "tier0_s64.dll")); RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "vstdlib_s64.dll")); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { LibraryPath += "osx32/libsteam_api.dylib"; PublicDelayLoadDLLs.Add(LibraryPath); PublicAdditionalShadowFiles.Add(LibraryPath); } else if (Target.Platform == UnrealTargetPlatform.Linux) { if (Target.IsMonolithic) { LibraryPath += "linux64"; PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryName); } else { LibraryPath += "linux64/libsteam_api.so"; PublicDelayLoadDLLs.Add(LibraryPath); } } }
public SQLiteSupport(ReadOnlyTargetRules Target) : base(Target) { string PlatformName = ""; string ConfigurationName = ""; switch (Target.Platform) { case UnrealTargetPlatform.Win32: PlatformName = "Win32/"; break; case UnrealTargetPlatform.Win64: PlatformName = "x64/"; break; case UnrealTargetPlatform.IOS: case UnrealTargetPlatform.TVOS: PlatformName = "IOS/"; break; case UnrealTargetPlatform.Mac: PlatformName = "Mac/"; break; case UnrealTargetPlatform.Linux: PlatformName = "Linux/"; break; } switch (Target.Configuration) { case UnrealTargetConfiguration.Debug: ConfigurationName = "Debug/"; break; case UnrealTargetConfiguration.DebugGame: ConfigurationName = "Debug/"; break; default: ConfigurationName = "Release/"; break; } string LibraryPath = "" + Target.UEThirdPartySourceDirectory + "sqlite/lib/" + PlatformName + ConfigurationName; string LibraryFilename; if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.XboxOne) { LibraryFilename = Path.Combine(LibraryPath, "sqlite.lib"); } else { LibraryFilename = Path.Combine(LibraryPath, "sqlite.a"); } if (!File.Exists(LibraryFilename) && !Target.bPrecompile) { throw new BuildException("Please refer to the Engine/Source/ThirdParty/sqlite/README.txt file prior to enabling this module."); } PublicIncludePaths.Add(Target.UEThirdPartySourceDirectory + "sqlite/sqlite/"); PublicDependencyModuleNames.AddRange( new string[] { "Core", "DatabaseSupport", } ); // Lib file PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryFilename); PrecompileForTargets = PrecompileTargetsType.None; }
public NdiMedia(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; DynamicallyLoadedModuleNames.AddRange( new string[] { "Media", } ); PrivateDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "NdiMediaFactory", "Networking", "Projects", "RenderCore", } ); PrivateIncludePathModuleNames.AddRange( new string[] { "Media", } ); PrivateIncludePaths.AddRange( new string[] { "NdiMedia/Private", "NdiMedia/Private/Assets", "NdiMedia/Private/Ndi", "NdiMedia/Private/Player", "NdiMedia/Private/Shared", } ); PublicDependencyModuleNames.AddRange( new string[] { "MediaAssets", } ); // add NDI libraries string NdiDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "ThirdParty")); PrivateIncludePaths.Add(Path.Combine(NdiDir, "include")); if (Target.Platform == UnrealTargetPlatform.IOS) { string LibDir = Path.Combine(NdiDir, "lib", "apple", "iOS"); string LibPath = Path.Combine(LibDir, "libndi_ios.a"); PublicAdditionalLibraries.Add(LibPath); } else if (Target.Platform == UnrealTargetPlatform.Linux) { string LibDir = Path.Combine(NdiDir, "lib", "linux", "x86_64-linux-gnu-5.4"); string LibPath = Path.Combine(LibDir, "libndi.a"); string DllPath = Path.Combine(LibDir, "libndi.so.1.0.1"); PublicAdditionalLibraries.Add(LibPath); PublicAdditionalLibraries.Add("stdc++"); RuntimeDependencies.Add(new RuntimeDependency(DllPath)); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string LibDir = Path.Combine(NdiDir, "lib", "apple", "x64"); string DllPath = Path.Combine(LibDir, "libndi.dylib"); PublicLibraryPaths.Add(LibDir); PublicAdditionalLibraries.Add(DllPath); PublicDelayLoadDLLs.Add(DllPath); RuntimeDependencies.Add(new RuntimeDependency(DllPath)); } else if (Target.Platform == UnrealTargetPlatform.Win32) { string LibDir = Path.Combine(NdiDir, "lib", "windows", "x86"); string DllPath = Path.Combine(LibDir, "Processing.NDI.Lib.x86.dll"); PublicLibraryPaths.Add(LibDir); PublicAdditionalLibraries.Add("Processing.NDI.Lib.x86.lib"); PublicDelayLoadDLLs.Add("Processing.NDI.Lib.x86.dll"); RuntimeDependencies.Add(new RuntimeDependency(DllPath)); } else if (Target.Platform == UnrealTargetPlatform.Win64) { string LibDir = Path.Combine(NdiDir, "lib", "windows", "x64"); string DllPath = Path.Combine(LibDir, "Processing.NDI.Lib.x64.dll"); PublicLibraryPaths.Add(LibDir); PublicAdditionalLibraries.Add("Processing.NDI.Lib.x64.lib"); PublicDelayLoadDLLs.Add("Processing.NDI.Lib.x64.dll"); RuntimeDependencies.Add(new RuntimeDependency(DllPath)); } else { System.Console.WriteLine("NDI SDK does not supported this platform"); } }
public GameLiftServerSDK(TargetInfo Target) { PublicIncludePaths.AddRange( new string[] { "GameLiftServerSDK/Public" } ); PrivateIncludePaths.AddRange( new string[] { "GameLiftServerSDK/Private", } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "Projects" } ); PrivateDependencyModuleNames.AddRange( new string[] { } ); DynamicallyLoadedModuleNames.AddRange( new string[] { } ); string BaseDirectory = System.IO.Path.GetFullPath(System.IO.Path.Combine(ModuleDirectory, "..", "..")); string SDKDirectory = System.IO.Path.Combine(BaseDirectory, "ThirdParty", "GameLiftServerSDK", Target.Platform.ToString()); bool bHasGameLiftSDK = System.IO.Directory.Exists(SDKDirectory); if (bHasGameLiftSDK) { if (Target.Type == TargetRules.TargetType.Server) { Definitions.Add("WITH_GAMELIFT=1"); if (Target.Platform == UnrealTargetPlatform.Linux) { SDKDirectory = System.IO.Path.Combine(SDKDirectory, "x86_64-unknown-linux-gnu"); string SDKLib = System.IO.Path.Combine(SDKDirectory, "libaws-cpp-sdk-gamelift-server.so"); PublicLibraryPaths.Add(SDKDirectory); PublicAdditionalLibraries.Add(SDKLib); RuntimeDependencies.Add(new RuntimeDependency(SDKLib)); } else if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(SDKDirectory); PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.lib")); PublicDelayLoadDLLs.Add("aws-cpp-sdk-gamelift-server.dll"); string SDKLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.dll"); RuntimeDependencies.Add(new RuntimeDependency(SDKLibWindows)); } } else { Definitions.Add("WITH_GAMELIFT=0"); } } else { Definitions.Add("WITH_GAMELIFT=0"); } }
public UElibPNG(TargetInfo Target) { Type = ModuleType.External; string libPNGPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2"; PublicIncludePaths.Add(libPNGPath); if (Target.Platform == UnrealTargetPlatform.Win64) { string LibPath = libPNGPath + "/lib/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(LibPath); string LibFileName = "libpng" + (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT ? "d" : "") + "_64.lib"; PublicAdditionalLibraries.Add(LibFileName); } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") // simulator ) { libPNGPath = libPNGPath + "/lib/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(libPNGPath); string LibFileName = "libpng" + (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT ? "d" : "") + ".lib"; PublicAdditionalLibraries.Add(LibFileName); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicAdditionalLibraries.Add(libPNGPath + "/lib/Mac/libpng.a"); } else if (Target.Platform == UnrealTargetPlatform.IOS) { if (Target.Architecture == "-simulator") { PublicLibraryPaths.Add(libPNGPath + "/lib/ios/Simulator"); PublicAdditionalShadowFiles.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2/lib/ios/Simulator/libpng152.a"); } else { PublicLibraryPaths.Add(libPNGPath + "/lib/ios/Device"); PublicAdditionalShadowFiles.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2/lib/ios/Device/libpng152.a"); } PublicAdditionalLibraries.Add("png152"); } else if (Target.Platform == UnrealTargetPlatform.TVOS) { if (Target.Architecture == "-simulator") { PublicLibraryPaths.Add(libPNGPath + "/lib/TVOS/Simulator"); PublicAdditionalShadowFiles.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2/lib/TVOS/Simulator/libpng152.a"); } else { PublicLibraryPaths.Add(libPNGPath + "/lib/TVOS/Device"); PublicAdditionalShadowFiles.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2/lib/TVOS/Device/libpng152.a"); } PublicAdditionalLibraries.Add("png152"); } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicLibraryPaths.Add(libPNGPath + "/lib/Android/ARMv7"); PublicLibraryPaths.Add(libPNGPath + "/lib/Android/ARM64"); PublicLibraryPaths.Add(libPNGPath + "/lib/Android/x86"); PublicLibraryPaths.Add(libPNGPath + "/lib/Android/x64"); PublicAdditionalLibraries.Add("png"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicAdditionalLibraries.Add(libPNGPath + "/lib/Linux/" + Target.Architecture + "/libpng.a"); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PublicLibraryPaths.Add(libPNGPath + "/lib/HTML5"); string OpimizationSuffix = ""; if (UEBuildConfiguration.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } PublicAdditionalLibraries.Add(libPNGPath + "/lib/HTML5/libpng" + OpimizationSuffix + ".bc"); } }
public KlawrRuntimePlugin(TargetInfo Target) { PublicIncludePaths.AddRange( new string[] { // ... add other public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "KlawrRuntimePlugin/Private", "ThirdParty/Klawr/ClrHostNative/Public" // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "InputCore", "SlateCore", // ... add other public dependencies that you statically link with here ... } ); if (UEBuildConfiguration.bBuildEditor == true) { PublicDependencyModuleNames.AddRange( new string[] { "UnrealEd", } ); } PrivateDependencyModuleNames.AddRange( new string[] { // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); //this needs to be tied to that the code generator has run. when does it run? var basePath = Path.GetDirectoryName(ModuleDirectory); var pluginPath = Path.GetFullPath(Path.Combine(basePath, "..", @"Source\ThirdParty\Klawr", Target.Platform.ToString(), "Release", "Klawr.ClrHost.Native-x64-Release.lib")); if (File.Exists(pluginPath)) { Definitions.Add("WITH_KLAWR=1"); Log.TraceInformation("Klawr runntime module dir at " + ModuleDirectory); Log.TraceInformation("Linking " + pluginPath); PublicLibraryPaths.Add(Path.GetDirectoryName(pluginPath)); PublicAdditionalLibraries.Add(pluginPath); PrivateDependencyModuleNames.Add("KlawrClrHostNative"); } else { Log.TraceInformation("Error: File not found for runntime plugin: " + pluginPath); } }
public zlib(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; CurrentZlibVersion = "v1.2.8"; OldZlibVersion = "zlib-1.2.5"; string zlibPath = Target.UEThirdPartySourceDirectory + "zlib/" + CurrentZlibVersion; // TODO: recompile for consoles and mobile platforms string OldzlibPath = Target.UEThirdPartySourceDirectory + "zlib/" + OldZlibVersion; string ConfigPath = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" :"Release"; if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32) { string Platform = Target.Platform.ToString(); string VSVersion = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicIncludePaths.Add(Path.Combine(zlibPath, "include", Platform, VSVersion)); PublicLibraryPaths.Add(Path.Combine(zlibPath, "lib", Platform, VSVersion, ConfigPath)); PublicAdditionalLibraries.Add("zlibstatic.lib"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string platform = "/Mac/"; PublicIncludePaths.Add(zlibPath + "/include" + platform); // OSX needs full path PublicAdditionalLibraries.Add(zlibPath + "/lib" + platform + "libz.a"); } else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS) { PublicIncludePaths.Add(OldzlibPath + "/Inc"); PublicAdditionalLibraries.Add("z"); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android)) { PublicIncludePaths.Add(OldzlibPath + "/Inc"); PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { string OpimizationSuffix = ""; if (Target.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } PublicIncludePaths.Add(OldzlibPath + "/Inc"); PublicAdditionalLibraries.Add(OldzlibPath + "/Lib/HTML5/zlib" + OpimizationSuffix + ".bc"); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { string platform = "/Linux/" + Target.Architecture; PublicIncludePaths.Add(zlibPath + "/include" + platform); PublicAdditionalLibraries.Add(zlibPath + "/lib/" + platform + "/libz_fPIC.a"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicIncludePaths.Add(OldzlibPath + "/Inc"); PublicLibraryPaths.Add(OldzlibPath + "/Lib/PS4"); PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Use reflection to allow type not to exist if console code is not present System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool"); if (XboxOnePlatformType != null) { System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null); PublicIncludePaths.Add(OldzlibPath + "/Inc"); PublicLibraryPaths.Add(OldzlibPath + "/Lib/XboxOne/VS" + VersionName.ToString()); PublicAdditionalLibraries.Add("zlib125_XboxOne.lib"); } } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicIncludePaths.Add(OldzlibPath + "/inc"); PublicAdditionalLibraries.Add(Path.Combine(OldzlibPath, "Lib/Switch/libz.a")); } }
public OpenVDB(ReadOnlyTargetRules Target) : base(Target) { // We are just setting up paths for pre-compiled binaries. Type = ModuleType.External; // For boost:: and TBB:: code bEnableUndefinedIdentifierWarnings = false; bUseRTTI = true; PublicDefinitions.Add("OPENVDB_STATICLIB"); PublicDefinitions.Add("OPENVDB_OPENEXR_STATICLIB"); PublicDefinitions.Add("OPENVDB_2_ABI_COMPATIBLE"); PublicIncludePaths.Add(ModuleDirectory); // For testing during developement bool bDebugPaths = true; // Only building for Windows if (Target.Platform == UnrealTargetPlatform.Win64) { string OpenVDBHeaderDir = ModuleDirectory + "/openvdb"; if (bDebugPaths) { if (!Directory.Exists(OpenVDBHeaderDir)) { string Err = string.Format("OpenVDB SDK not found in {0}", OpenVDBHeaderDir); System.Console.WriteLine(Err); throw new BuildException(Err); } } PublicIncludePaths.Add(OpenVDBHeaderDir); // Construct the OpenVDB directory name string LibDirName = ModuleDirectory + "/Deploy/"; LibDirName += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/lib/x64/"; bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT); if (bDebug) { LibDirName += "Debug/"; } else { LibDirName += "Release/"; } if (bDebugPaths) { // Look for the file if (!File.Exists(LibDirName + "OpenVDB.lib")) { string Err = string.Format("OpenVDB.lib not found in {0}", LibDirName); System.Console.WriteLine(Err); throw new BuildException(Err); } } PublicLibraryPaths.Add(LibDirName); PublicAdditionalLibraries.Add("OpenVDB.lib"); // Add openexr PublicIncludePaths.Add(Target.UEThirdPartySourceDirectory);// + "openexr/Deploy/include"); // Add TBB { // store the compiled tbb library in the same area as the rest of the third party code string TBBLibPath = ModuleDirectory + "/Deploy/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/lib/x64/IntelTBB-4.4u3/"; PublicIncludePaths.Add(Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.4u3/include"); // string TBBLibPath = Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.4u3/build/Windows_vc14/x64/"; if (bDebug) { TBBLibPath += "Debug-MT"; PublicAdditionalLibraries.Add("tbb_debug.lib"); } else { TBBLibPath += "Release-MT"; PublicAdditionalLibraries.Add("tbb.lib"); } PublicLibraryPaths.Add(TBBLibPath); } // Add LibZ { string ZLibPath = Target.UEThirdPartySourceDirectory + "zlib/zlib-1.2.5/Lib/Win64"; PublicLibraryPaths.Add(ZLibPath); if (bDebug) { PublicAdditionalLibraries.Add("zlibd_64.lib"); } else { PublicAdditionalLibraries.Add("zlib_64.lib"); } } } else { string Err = "Wrong build env!"; System.Console.WriteLine(Err); throw new BuildException(Err); } }
public libOpus(ReadOnlyTargetRules Target) : base(Target) { /** Mark the current version of the library */ string OpusVersion = "1.1"; Type = ModuleType.External; PublicIncludePaths.Add(Target.UEThirdPartySourceDirectory + "libOpus/opus-" + OpusVersion + "/include"); string LibraryPath = Target.UEThirdPartySourceDirectory + "libOpus/opus-" + OpusVersion + "/"; if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { LibraryPath += "Windows/VS2012/"; if (Target.Platform == UnrealTargetPlatform.Win64) { LibraryPath += "x64/"; } else { LibraryPath += "win32/"; } LibraryPath += "Release/"; PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add("silk_common.lib"); PublicAdditionalLibraries.Add("silk_float.lib"); PublicAdditionalLibraries.Add("celt.lib"); PublicAdditionalLibraries.Add("opus.lib"); PublicAdditionalLibraries.Add("speex_resampler.lib"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string OpusPath = LibraryPath + "/Mac/libopus.a"; string SpeexPath = LibraryPath + "/Mac/libspeex_resampler.a"; PublicAdditionalLibraries.Add(OpusPath); PublicAdditionalLibraries.Add(SpeexPath); } else if (Target.Platform == UnrealTargetPlatform.IOS) { string OpusPath = LibraryPath + "/IOS/libOpus.a"; PublicAdditionalLibraries.Add(OpusPath); } else if (Target.Platform == UnrealTargetPlatform.TVOS) { string OpusPath = LibraryPath + "/TVOS/libOpus.a"; PublicAdditionalLibraries.Add(OpusPath); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { if (Target.LinkType == TargetLinkType.Monolithic) { PublicAdditionalLibraries.Add(LibraryPath + "Linux/" + Target.Architecture + "/libopus.a"); } else { PublicAdditionalLibraries.Add(LibraryPath + "Linux/" + Target.Architecture + "/libopus_fPIC.a"); } if (Target.Architecture.StartsWith("x86_64")) { if (Target.LinkType == TargetLinkType.Monolithic) { PublicAdditionalLibraries.Add(LibraryPath + "Linux/" + Target.Architecture + "/libresampler.a"); } else { PublicAdditionalLibraries.Add(LibraryPath + "Linux/" + Target.Architecture + "/libresampler_fPIC.a"); } } } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android)) { PublicLibraryPaths.Add(LibraryPath + "Android/ARMv7/"); PublicLibraryPaths.Add(LibraryPath + "Android/ARM64/"); PublicLibraryPaths.Add(LibraryPath + "Android/x64/"); PublicAdditionalLibraries.Add("opus"); PublicAdditionalLibraries.Add("speex_resampler"); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { LibraryPath += "XboxOne/VS2015/Release/"; PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add("silk_common.lib"); PublicAdditionalLibraries.Add("silk_float.lib"); PublicAdditionalLibraries.Add("celt.lib"); PublicAdditionalLibraries.Add("opus.lib"); PublicAdditionalLibraries.Add("speex_resampler.lib"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicAdditionalLibraries.Add(LibraryPath + "PS4/ORBIS_Release/" + "OpusLibrary.a"); } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicAdditionalLibraries.Add(LibraryPath + "Switch/libOpus-1.1/NX64/Release/" + "libOpus-1.1.a"); } }
public PhysX(TargetInfo Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); Definitions.Add("WITH_PHYSX=1"); if (UEBuildConfiguration.bCompileAPEX == false) { // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but APEX is not. Definitions.Add("WITH_APEX=0"); } if (LibraryMode == PhysXLibraryMode.Shipping) { Definitions.Add("WITH_PHYSX_RELEASE=1"); } else { Definitions.Add("WITH_PHYSX_RELEASE=0"); } string PhysXVersion = "PhysX_3.4"; string PxSharedVersion = "PxShared"; string PhysXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/"; string PxSharedDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PxSharedVersion + "/"; string PhysXLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/"; string PxSharedLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/"; string PhysXIncludeDir = PhysXDir + "Include/"; string PxSharedIncludeDir = PxSharedDir + "include/"; if (Target.Platform == UnrealTargetPlatform.Switch) { // all physx includes in a Switch subdir PhysXIncludeDir = PhysXIncludeDir + "Switch/"; PxSharedIncludeDir = PxSharedIncludeDir + "Switch/"; } PublicSystemIncludePaths.AddRange( new string[] { PxSharedIncludeDir, PxSharedIncludeDir + "cudamanager", PxSharedIncludeDir + "filebuf", PxSharedIncludeDir + "foundation", PxSharedIncludeDir + "pvd", PxSharedIncludeDir + "task", PhysXIncludeDir, PhysXIncludeDir + "foundation", PhysXIncludeDir + "cooking", PhysXIncludeDir + "common", PhysXIncludeDir + "extensions", PhysXIncludeDir + "geometry" } ); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PhysXLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PxSharedLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesX64 = new string[] { "PhysX3{0}_x64.lib", "PhysX3Extensions{0}_x64.lib", "PhysX3Cooking{0}_x64.lib", "PhysX3Common{0}_x64.lib", "PsFastXml{0}_x64.lib", "PxFoundation{0}_x64.lib", "PxPvdSDK{0}_x64.lib", "PxTask{0}_x64.lib", }; string[] DelayLoadDLLsX64 = new string[] { "PxFoundation{0}_x64.dll", "PxPvdSDK{0}_x64.dll", "PhysX3{0}_x64.dll", "PhysX3Cooking{0}_x64.dll", "PhysX3Common{0}_x64.dll", }; string[] PxSharedRuntimeDependenciesX64 = new string[] { "PxFoundation{0}_x64.dll", "PxPvdSDK{0}_x64.dll", }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in DelayLoadDLLsX64) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } string PxSharedBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in PxSharedRuntimeDependenciesX64) { RuntimeDependencies.Add(new RuntimeDependency(PxSharedBinariesDir + String.Format(DLL, LibrarySuffix))); } } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { PhysXLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PxSharedLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesX86 = new string[] { "PhysX3{0}_x86.lib", "PhysX3Extensions{0}_x86.lib", "PhysX3Cooking{0}_x86.lib", "PhysX3Common{0}_x86.lib", "PsFastXml{0}_x86.lib", "PxFoundation{0}_x86.lib", "PxPvdSDK{0}_x86.lib", "PxTask{0}_x86.lib", }; string[] DelayLoadDLLsX86 = new string[] { "PxFoundation{0}_x86.dll", "PxPvdSDK{0}_x86.dll", "PhysX3{0}_x86.dll", "PhysX3Cooking{0}_x86.dll", "PhysX3Common{0}_x86.dll" }; foreach (string Lib in StaticLibrariesX86) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX86) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in DelayLoadDLLsX86) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { PhysXLibDir += "Mac"; PxSharedLibDir += "Mac"; PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesMac = new string[] { PhysXLibDir + "/libLowLevel{0}.a", PhysXLibDir + "/libLowLevelCloth{0}.a", PhysXLibDir + "/libPhysX3Extensions{0}.a", PhysXLibDir + "/libSceneQuery{0}.a", PhysXLibDir + "/libSimulationController{0}.a", PxSharedLibDir + "/libPxTask{0}.a", PxSharedLibDir + "/libPsFastXml{0}.a" }; foreach (string Lib in StaticLibrariesMac) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } string[] DynamicLibrariesMac = new string[] { "/libPhysX3{0}.dylib", "/libPhysX3Cooking{0}.dylib", "/libPhysX3Common{0}.dylib", "/libPxFoundation{0}.dylib", "/libPxPvdSDK{0}.dylib", }; string PhysXBinariesDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac"; foreach (string Lib in DynamicLibrariesMac) { string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix); PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(new RuntimeDependency(LibraryPath)); } if (LibrarySuffix != "") { Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/x86"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/arm64"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/x64"); string[] StaticLibrariesAndroid = new string[] { "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "PhysX3{0}", "PhysX3Extensions{0}", // "PhysX3Cooking{0}", // not needed until Apex "PhysX3Common{0}", //"PhysXVisualDebuggerSDK{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; //if you are shipping, and you actually want the shipping libs, you do not need this lib if (!(LibraryMode == PhysXLibraryMode.Shipping && BuildConfiguration.bUseShippingPhysXLibraries)) { // PublicAdditionalLibraries.Add("nvToolsExt"); } foreach (string Lib in StaticLibrariesAndroid) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Linux) { PhysXLibDir += "/Linux/" + Target.Architecture; PxSharedLibDir += "/Linux/" + Target.Architecture; PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesPhysXLinux = new string[] { "rt", "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; foreach (string Lib in StaticLibrariesPhysXLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } if (UEBuildConfiguration.bCompileAPEX) { string[] StaticLibrariesApexLinux = new string[] { "NvParameterized{0}", "RenderDebug{0}" }; foreach (string Lib in StaticLibrariesApexLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } } else if (Target.Platform == UnrealTargetPlatform.IOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "IOS/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "IOS/"); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.TVOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "TVOS/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "TVOS/"); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "HTML5/"); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3CharacterKinematic", "PhysX3Common", "PhysX3Cooking", "PhysX3Extensions", //"PhysXVisualDebuggerSDK", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (var lib in PhysXLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicLibraryPaths.Add(PhysXLibDir + "PS4"); string[] StaticLibrariesPS4 = new string[] { "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; foreach (string Lib in StaticLibrariesPS4) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { Definitions.Add("PX_PHYSX_STATIC_LIB=1"); Definitions.Add("_XBOX_ONE=1"); PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS" + WindowsPlatform.GetVisualStudioCompilerVersionName())); string[] StaticLibrariesXB1 = new string[] { "PhysX3{0}.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}.lib", "PhysX3Common{0}.lib", "LowLevel{0}.lib", "LowLevelAABB{0}.lib", "LowLevelCloth{0}.lib", "LowLevelDynamics{0}.lib", "LowLevelParticles{0}.lib", "SceneQuery{0}.lib", "SimulationController{0}.lib", "PxFoundation{0}.lib", "PxTask{0}.lib", "PxPvdSDK{0}.lib", "PsFastXml{0}.lib" }; foreach (string Lib in StaticLibrariesXB1) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicLibraryPaths.Add(PhysXLibDir + "Switch"); PublicLibraryPaths.Add(PxSharedLibDir + "Switch"); string[] StaticLibrariesSwitch = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string Lib in StaticLibrariesSwitch) { PublicAdditionalLibraries.Add(Lib + LibrarySuffix); } } }
public ScriptPlugin(ReadOnlyTargetRules Target) : base(Target) { PublicIncludePaths.AddRange( new string[] { //"Programs/UnrealHeaderTool/Public", // ... add other public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "InputCore", "SlateCore", // ... add other public dependencies that you statically link with here ... } ); if (Target.bBuildEditor == true) { PublicDependencyModuleNames.AddRange( new string[] { "UnrealEd", } ); } DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); var LuaPath = Path.Combine("..", "Plugins", "ScriptPlugin", "Source", "Lua"); var LuaLibDirectory = Path.Combine(LuaPath, "Lib", Target.Platform.ToString(), "Release"); var LuaLibPath = Path.Combine(LuaLibDirectory, "Lua.lib"); if (File.Exists(LuaLibPath)) { PublicDefinitions.Add("WITH_LUA=1"); // Path to Lua include files var IncludePath = Path.GetFullPath(Path.Combine(LuaPath, "Include")); PrivateIncludePaths.Add(IncludePath); // Lib file PublicLibraryPaths.Add(LuaLibDirectory); PublicAdditionalLibraries.Add(LuaLibPath); Log.TraceVerbose("LUA Integration enabled: {0}", IncludePath); } else { Log.TraceVerbose("LUA Integration NOT enabled"); PublicDefinitions.Add("WITH_LUA=0"); } }
public SubstanceCore(ReadOnlyTargetRules Target) : base(Target) { //Internal defines PublicDefinitions.Add("WITH_SUBSTANCE=1"); PublicDefinitions.Add("SUBSTANCE_PLATFORM_BLEND=1"); PublicDefinitions.Add("SUBSTANCE_CORE_DEBUG_TOOLS=0"); //PCH file PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; bEnforceIWYU = true; PrivatePCHHeaderFile = "Private/SubstanceCorePrivatePCH.h"; //Thread usage if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.XboxOne) { PublicDefinitions.Add("AIR_USE_WIN32_SYNC=1"); } else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.PS4 || Target.Platform == UnrealTargetPlatform.Linux) { PublicDefinitions.Add("AIR_USE_PTHREAD_SYNC=1"); } //Exposing the include path to substance core publicly. Even though the include paths are public, the libs should no longer be exposed. PrivateIncludePaths.Add("SubstanceCore/Private"); //Exposing public include paths PublicIncludePaths.Add(Path.Combine(ModuleFullPath, "Public")); PublicIncludePaths.Add(Path.Combine(ModuleFullPath, "Classes")); PublicIncludePaths.Add(SubstanceIncludePath); //Module dependencies PrivateDependencyModuleNames.AddRange(new string[] { "Projects", "Slate", "SlateCore", "SubstanceEngine" }); PublicDependencyModuleNames.AddRange(new string[] { "AssetRegistry", "Core", "CoreUObject", "Engine", "RenderCore", "RHI", "ImageWrapper", "SessionServices", }); //Editor specific configuration bool IncludePS4Files = false; if (Target.bBuildEditor == true) { PublicDependencyModuleNames.AddRange(new string[] { "UnrealEd", "AssetTools", "ContentBrowser", "Settings", "TargetPlatform", "MainFrame" }); //Used for ps4 cooking string SDKDir = System.Environment.GetEnvironmentVariable("SCE_ORBIS_SDK_DIR"); if ((SDKDir != null) && (SDKDir.Length > 0)) { PublicIncludePaths.Add(SDKDir + "/target/include_common"); PublicLibraryPaths.Add(SDKDir + "/host_tools/lib"); PublicAdditionalLibraries.Add("libSceGpuAddress.lib"); PublicDelayLoadDLLs.Add("libSceGpuAddress.dll"); PublicAdditionalLibraries.Add("libSceGnm.lib"); PublicDelayLoadDLLs.Add("libSceGnm.dll"); //Toggle on our flag if we are building for PS4 IncludePS4Files = true; } } //Overwrite PS4 SDK if the files don't exist - Check both Engine and Project directories string ConsoleFilePath = "SubstanceCore\\Private\\SubstanceCorePS4Utils.h"; string BaseEnginePath = Path.Combine("..", "Plugins", "Runtime", "Substance", "Source"); string BaseProjectPath = Path.Combine("Plugins", "Runtime", "Substance", "Source"); string ConsoleEngineFilePath = Path.Combine(BaseEnginePath, ConsoleFilePath); bool ConsoleFilesFoundInEnginePluginDir = false; bool ConsoleFilesFoundInProjectPluginDir = false; //If building plugin from engine dir, project file will not exist if (Target.ProjectFile != null) { string ProjectParentDir = System.IO.Directory.GetParent(Target.ProjectFile.ToString()).ToString(); string ConsoleProjectFilePath = Path.Combine(ProjectParentDir, BaseProjectPath, ConsoleFilePath); ConsoleFilesFoundInProjectPluginDir = File.Exists(ConsoleProjectFilePath) && IncludePS4Files; } //Check both possible locations of where the console files could be ConsoleFilesFoundInEnginePluginDir = File.Exists(ConsoleEngineFilePath) && IncludePS4Files; //Craft the project file location to test as well IncludePS4Files = (ConsoleFilesFoundInEnginePluginDir || ConsoleFilesFoundInProjectPluginDir) && IncludePS4Files; PublicDefinitions.Add("SUBSTANCE_HAS_PS4_SDK=" + (IncludePS4Files ? "1" : "0")); if (IncludePS4Files) { Log.WriteLine(LogEventType.Log, "Substance Editor Plugin: PS4 Cooking Enabled"); } }
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[] { // ... add public include paths required here ... "Runtime/Core/Public/Modules/" } ); PrivateIncludePaths.AddRange( new string[] { // ... 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", "Core" // ... 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 { 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" }); } 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); } 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"); } PublicIncludePaths.Add(includesPath); PublicAdditionalLibraries.Add(libsPath); } else { string[] items = pythonHome.Split(';'); PublicIncludePaths.Add(items[0]); 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)); //ReceiptProperties.Add("AndroidPlugin", RelAPLPath)) } #endif }
public NvCloth(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; // Determine which kind of libraries to link against NvClothLibraryMode LibraryMode = GetNvClothLibraryMode(Target.Configuration); string LibrarySuffix = GetNvClothLibrarySuffix(LibraryMode); Definitions.Add("WITH_NVCLOTH=1"); string NvClothDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/NvCloth/"; string NvClothLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib"; string PxSharedVersion = "PxShared"; string PxSharedDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PxSharedVersion + "/"; string PxSharedIncludeDir = PxSharedDir + "include/"; PublicSystemIncludePaths.AddRange( new string[] { NvClothDir + "include", NvClothDir + "extensions/include", PxSharedIncludeDir, PxSharedIncludeDir + "filebuf", PxSharedIncludeDir + "foundation", PxSharedIncludeDir + "pvd", PxSharedIncludeDir + "task", PxSharedDir + "src/foundation/include" } ); // List of default library names (unused unless LibraryFormatString is non-null) List <string> NvClothLibraries = new List <string>(); NvClothLibraries.AddRange( new string[] { "NvCloth{0}" }); string LibraryFormatString = null; // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { NvClothLibDir += "/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(NvClothLibDir); string[] StaticLibrariesX64 = new string[] { "NvCloth{0}_x64.lib" }; string[] RuntimeDependenciesX64 = { "NvCloth{0}_x64.dll", }; string[] DelayLoadDLLsX64 = { "NvCloth{0}_x64.dll", }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string NvClothBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string RuntimeDependency in RuntimeDependenciesX64) { string FileName = NvClothBinariesDir + String.Format(RuntimeDependency, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { Definitions.Add("UE_NVCLOTH_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Win32) { NvClothLibDir += "/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(NvClothLibDir); string[] StaticLibrariesX64 = new string[] { "NvCloth{0}_x86.lib" }; string[] RuntimeDependenciesX64 = { "NvCloth{0}_x86.dll", }; string[] DelayLoadDLLsX64 = { "NvCloth{0}_x86.dll", }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string NvClothBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string RuntimeDependency in RuntimeDependenciesX64) { string FileName = NvClothBinariesDir + String.Format(RuntimeDependency, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { Definitions.Add("UE_NVCLOTH_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { NvClothLibDir += "/Mac"; LibraryFormatString = NvClothLibDir + "/lib{0}" + ".a"; NvClothLibraries.Clear(); string[] DynamicLibrariesMac = new string[] { "/libNvCloth{0}.dylib", }; string PhysXBinDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac"; foreach (string Lib in DynamicLibrariesMac) { string LibraryPath = PhysXBinDir + String.Format(Lib, LibrarySuffix); PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(new RuntimeDependency(LibraryPath)); } if (LibrarySuffix != "") { Definitions.Add("UE_NVCLOTH_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Linux) { if (Target.Architecture != "arm-unknown-linux-gnueabihf") { NvClothLibDir += "/Linux/" + Target.Architecture; NvClothLibraries.Add("NvCloth{0}"); LibraryFormatString = NvClothLibDir + "/lib{0}" + ".a"; } } else if (Target.Platform == UnrealTargetPlatform.PS4) { NvClothLibDir += "/PS4"; PublicLibraryPaths.Add(NvClothLibDir); NvClothLibraries.Add("NvCloth{0}"); LibraryFormatString = "{0}"; } else if (Target.Platform == UnrealTargetPlatform.Switch) { NvClothLibDir += "/Switch"; PublicLibraryPaths.Add(NvClothLibDir); NvClothLibraries.Add("NvCloth{0}"); LibraryFormatString = "{0}"; } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { Definitions.Add("_XBOX_ONE=1"); // This MUST be defined for XboxOne! Definitions.Add("PX_HAS_SECURE_STRCPY=1"); NvClothLibDir += "/XboxOne/VS2015"; PublicLibraryPaths.Add(NvClothLibDir); NvClothLibraries.Add("NvCloth{0}"); LibraryFormatString = "{0}.lib"; } // Add the libraries needed (used for all platforms except Windows) if (LibraryFormatString != null) { foreach (string Lib in NvClothLibraries) { string ConfiguredLib = String.Format(Lib, LibrarySuffix); string FinalLib = String.Format(LibraryFormatString, ConfiguredLib); PublicAdditionalLibraries.Add(FinalLib); } } }
public FreeType2(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; PublicDefinitions.Add("WITH_FREETYPE=1"); string FreeType2Path; string FreeType2LibPath; if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.XboxOne || Target.Platform == UnrealTargetPlatform.Switch || Target.Platform == UnrealTargetPlatform.PS4 || Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.HTML5 || Target.Platform == UnrealTargetPlatform.HoloLens) { FreeType2Path = Target.UEThirdPartySourceDirectory + "FreeType2/FreeType2-2.6/"; PublicSystemIncludePaths.Add(FreeType2Path + "Include"); } else { if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { FreeType2Path = Target.UEThirdPartySourceDirectory + "FreeType2/FreeType2-2.6/"; PublicSystemIncludePaths.Add(FreeType2Path + "Include"); } else { FreeType2Path = Target.UEThirdPartySourceDirectory + "FreeType2/FreeType2-2.4.12/"; PublicSystemIncludePaths.Add(FreeType2Path + "include"); } } FreeType2LibPath = FreeType2Path + "Lib/"; if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { FreeType2LibPath += (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64/" : "Win32/"; FreeType2LibPath += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(FreeType2LibPath); PublicAdditionalLibraries.Add("freetype26MT.lib"); } else if (Target.Platform == UnrealTargetPlatform.HoloLens) { string PlatformSubpath = Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM32 || Target.WindowsPlatform.Architecture == WindowsArchitecture.x86 ? "Win32" : "Win64"; if (Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM32 || Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM64) { PublicLibraryPaths.Add(System.String.Format("{0}Lib/{1}/VS{2}/{3}/", FreeType2Path, PlatformSubpath, Target.WindowsPlatform.GetVisualStudioCompilerVersionName(), Target.WindowsPlatform.GetArchitectureSubpath())); } else { PublicLibraryPaths.Add(System.String.Format("{0}Lib/{1}/VS{2}/", FreeType2Path, PlatformSubpath, Target.WindowsPlatform.GetVisualStudioCompilerVersionName())); } PublicAdditionalLibraries.Add("freetype26MT.lib"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicAdditionalLibraries.Add(FreeType2LibPath + "Mac/libfreetype2412.a"); } else if (Target.Platform == UnrealTargetPlatform.IOS) { if (Target.Architecture == "-simulator") { PublicLibraryPaths.Add(FreeType2LibPath + "ios/Simulator"); } else { PublicLibraryPaths.Add(FreeType2LibPath + "ios/Device"); } PublicAdditionalLibraries.Add("freetype2412"); } else if (Target.Platform == UnrealTargetPlatform.TVOS) { if (Target.Architecture == "-simulator") { PublicLibraryPaths.Add(FreeType2LibPath + "TVOS/Simulator"); } else { PublicLibraryPaths.Add(FreeType2LibPath + "TVOS/Device"); } PublicAdditionalLibraries.Add("freetype2412"); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android)) { // filtered out in the toolchain PublicLibraryPaths.Add(FreeType2LibPath + "Android/ARMv7"); PublicLibraryPaths.Add(FreeType2LibPath + "Android/ARM64"); PublicLibraryPaths.Add(FreeType2LibPath + "Android/x86"); PublicLibraryPaths.Add(FreeType2LibPath + "Android/x64"); PublicAdditionalLibraries.Add("freetype2412"); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { if (Target.Type == TargetType.Server) { string Err = string.Format("{0} dedicated server is made to depend on {1}. We want to avoid this, please correct module dependencies.", Target.Platform.ToString(), this.ToString()); System.Console.WriteLine(Err); throw new BuildException(Err); } PublicSystemIncludePaths.Add(FreeType2Path + "Include"); if (Target.LinkType == TargetLinkType.Monolithic) { PublicAdditionalLibraries.Add(FreeType2LibPath + "Linux/" + Target.Architecture + "/libfreetype.a"); } else { PublicAdditionalLibraries.Add(FreeType2LibPath + "Linux/" + Target.Architecture + "/libfreetype_fPIC.a"); } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PublicLibraryPaths.Add(FreeType2Path + "Lib/HTML5"); string OpimizationSuffix = ""; if (Target.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } PublicAdditionalLibraries.Add(FreeType2Path + "Lib/HTML5/libfreetype260" + OpimizationSuffix + ".bc"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicLibraryPaths.Add(FreeType2LibPath + "PS4"); PublicAdditionalLibraries.Add("freetype26"); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Use reflection to allow type not to exist if console code is not present System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool"); if (XboxOnePlatformType != null) { System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null); PublicLibraryPaths.Add(FreeType2LibPath + "XboxOne/VS" + VersionName.ToString()); PublicAdditionalLibraries.Add("freetype26.lib"); } } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicAdditionalLibraries.Add(System.IO.Path.Combine(FreeType2LibPath, "Switch/libFreetype.a")); } }
public glTFForUE4Ed(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseSharedPCHs; PublicIncludePaths.AddRange(new [] { "glTFForUE4Ed/Public" }); PrivateIncludePaths.AddRange(new [] { "glTFForUE4Ed/Private", }); PublicDependencyModuleNames.AddRange(new [] { "Core", }); PrivateDependencyModuleNames.AddRange(new [] { "CoreUObject", "Engine", "RHI", "InputCore", "RenderCore", "SlateCore", "Slate", "ImageWrapper", "UnrealEd", "MainFrame", "Documentation", "PropertyEditor", "EditorStyle", "RawMesh", "glTFForUE4", }); string ExtraPathRoot = System.IO.Path.Combine(ModuleDirectory, "..", "..", "Extras"); // libgltf { string glTFPath = System.IO.Path.Combine(ExtraPathRoot, "libgltf_ue4", "libgltf-0.1.3"); string IncludePath = System.IO.Path.Combine(glTFPath, "include"); string LibPath = ""; string LibFilePath = ""; if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64)) { string PlatformName = ""; switch (Target.Platform) { case UnrealTargetPlatform.Win32: PlatformName = "win32"; break; case UnrealTargetPlatform.Win64: PlatformName = "win64"; break; } string VSName = "vs" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); LibPath = System.IO.Path.Combine(glTFPath, "lib", PlatformName, VSName); LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.lib"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { LibPath = System.IO.Path.Combine(glTFPath, "lib", "linux"); LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.a"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { LibPath = System.IO.Path.Combine(glTFPath, "lib", "macos"); LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.a"); } else if (Target.Platform == UnrealTargetPlatform.IOS) { LibPath = System.IO.Path.Combine(glTFPath, "lib", "ios"); LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.a"); } PublicIncludePaths.Add(IncludePath); PublicLibraryPaths.Add(LibPath); PublicAdditionalLibraries.Add(LibFilePath); } // libdraco { string DracoPath = System.IO.Path.Combine(ExtraPathRoot, "libdraco_ue4", "libdraco-1.2.5"); string IncludePath = System.IO.Path.Combine(DracoPath, "include"); string LibPath = ""; string LibFilePath1 = ""; string LibFilePath2 = ""; if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64)) { string PlatformName = ""; switch (Target.Platform) { case UnrealTargetPlatform.Win32: PlatformName = "win32"; break; case UnrealTargetPlatform.Win64: PlatformName = "win64"; break; } string VSName = "vs" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); LibPath = System.IO.Path.Combine(DracoPath, "lib", PlatformName, VSName); LibFilePath1 = System.IO.Path.Combine(LibPath, "dracodec.lib"); LibFilePath2 = System.IO.Path.Combine(LibPath, "dracoenc.lib"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { LibPath = System.IO.Path.Combine(DracoPath, "lib", "linux"); LibFilePath1 = System.IO.Path.Combine(LibPath, "libdracodec.a"); LibFilePath2 = System.IO.Path.Combine(LibPath, "libdracoenc.a"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { LibPath = System.IO.Path.Combine(DracoPath, "lib", "macos"); LibFilePath1 = System.IO.Path.Combine(LibPath, "libdracodec.a"); LibFilePath2 = System.IO.Path.Combine(LibPath, "libdracoenc.a"); } PublicIncludePaths.Add(IncludePath); PublicLibraryPaths.Add(LibPath); PublicAdditionalLibraries.Add(LibFilePath1); PublicAdditionalLibraries.Add(LibFilePath2); } }
public GoogleTest(TargetInfo Target) { Type = ModuleType.External; string RootPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "GoogleTest/"; string DefaultConfiguration = "MinSizeRel"; // Includes PublicSystemIncludePaths.Add(RootPath + "include/"); // Libraries string PartialLibraryPath = "lib/" + Target.Platform.ToString() + "/"; string LibraryPath = RootPath; if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32) { PartialLibraryPath += "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) { PartialLibraryPath += "/Debug"; } else { PartialLibraryPath += "/" + DefaultConfiguration; } //if (!Target.IsMonolithic) //{ // PartialLibraryPath += "_Shared"; //} PartialLibraryPath += "/"; LibraryPath += PartialLibraryPath; //i.e. Engine\Source\ThirdParty\GoogleTest\lib\Win64\VS2013\MinSizeRel_Shared\ // I was unable to get non-monolithic windows builds working without crashing within the // time box I was given for the integration. The workaround is to ensure that all tests // are included in the same dll when building monolithic, otherwise error messages // will not be routed properly. // We should re-investigate this integration problem in the future, as more teams want to // adopt usage of the library //if (!Target.IsMonolithic) //{ // PublicAdditionalLibraries.Add("gmock_main.lib"); // RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/GoogleTest/" + PartialLibraryPath + "gmock_main.dll")); //} //else //{ PublicAdditionalLibraries.Add("gtest.lib"); PublicAdditionalLibraries.Add("gmock.lib"); PublicAdditionalLibraries.Add("gmock_main.lib"); //} } else if (Target.Platform == UnrealTargetPlatform.Mac) { if (Target.IsMonolithic) { PartialLibraryPath += DefaultConfiguration + "/"; LibraryPath += PartialLibraryPath; PublicAdditionalLibraries.Add(LibraryPath + "libgtest.a"); PublicAdditionalLibraries.Add(LibraryPath + "libgmock.a"); PublicAdditionalLibraries.Add(LibraryPath + "libgmock_main.a"); } else { PartialLibraryPath += DefaultConfiguration + "_Shared/"; LibraryPath += PartialLibraryPath; PublicAdditionalLibraries.Add(LibraryPath + "libgmock_main.dylib"); } } PublicLibraryPaths.Add(LibraryPath); // The including module will also need these enabled Definitions.Add("WITH_GOOGLE_MOCK=1"); Definitions.Add("WITH_GOOGLE_TEST=1"); Definitions.Add("GTEST_HAS_POSIX_RE=0"); if (!Target.IsMonolithic) { //Definitions.Add("GTEST_LINKED_AS_SHARED_LIBRARY=1"); } }
public AdMob(ReadOnlyTargetRules Target) : base(Target) { string strEngineDir = GetEngineDirectory(); string strEngineVersion = ReadEngineVersion(strEngineDir); System.Console.WriteLine("version:" + strEngineVersion); PublicIncludePaths.AddRange( new string[] { "AdMob/Public" // ... add public include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "Slate", "SlateCore", "AdCollection", // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); if (Target.Platform == UnrealTargetPlatform.IOS) { PrivateIncludePaths.Add("Private/IOS"); PrivateIncludePaths.Add("../AdCollection/ThirdPartyFrameworks/VungleAdmobIOS/"); string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath + "/Source/"); PluginPath = PluginPath.Replace("\\", "/"); string strStaticPath = PluginPath + "/../AdCollection/ThirdPartyFrameworks/VungleAdmobIOS/"; PublicLibraryPaths.Add(strStaticPath); PublicAdditionalFrameworks.Add( new UEBuildFramework( "GoogleMobileAds", // Framework name "../AdCollection/ThirdPartyFrameworks/GoogleMobileAds.embeddedframework.zip") ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "UnityAds", // Framework name "../AdCollection/ThirdPartyFrameworks/UnityAds.embeddedframework.zip") ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "VungleSDK", // Framework name "../AdCollection/ThirdPartyFrameworks/VungleSDK.embeddedframework.zip") ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "Chartboost", // Framework name "../AdCollection/ThirdPartyFrameworks/Chartboost.embeddedframework.zip") ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "AdColony", // Framework name "../AdCollection/ThirdPartyFrameworks/AdColony-iOS-SDK-3.zip") ); // adapter PublicAdditionalFrameworks.Add( new UEBuildFramework( "UnityAdapter", // Framework name "../AdCollection/ThirdPartyFrameworks/UnityAdapter-2.1.0.0.zip") ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "ChartboostAdapter", // Framework name "../AdCollection/ThirdPartyFrameworks/ChartboostAdapter-6.6.3.0.zip") ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "AdColonyAdapter", // Framework name "../AdCollection/ThirdPartyFrameworks/AdColonyAdapter-3.1.1.0.zip") ); // helper lib PublicAdditionalFrameworks.Add( new UEBuildFramework( "AdsUtil", // Framework name "../AdCollection/ThirdPartyFrameworks/AdsUtil.embeddedframework.zip") ); PublicAdditionalLibraries.Add("VungleAdapter"); PublicAdditionalShadowFiles.Add(strStaticPath + "libVungleAdapter.a"); PublicFrameworks.AddRange( new string[] { "EventKit", "MediaPlayer", "AdSupport", "CoreLocation", "SystemConfiguration", "MessageUI", "Security", "CoreTelephony" } ); } else if (Target.Platform == UnrealTargetPlatform.Android) { PrivateIncludePaths.Add("Private/Android"); PrivateDependencyModuleNames.AddRange( new string[] { "Launch", } ); string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath); if (EngineMinorVersion == "18") { AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "AdMob418_UPL.xml"))); } else { AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "AdMob_UPL.xml"))); } } else if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { PrivateIncludePaths.Add("Private/Windows"); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PrivateIncludePaths.Add("Private/HTML5"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PrivateIncludePaths.Add("Private/Mac"); } else { PrecompileForTargets = PrecompileTargetsType.None; } }
public FLEX(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; if (Target.bCompileNvFlexD3D == false && Target.bCompileNvFlexCUDA == false) { Definitions.Add("WITH_FLEX=0"); return; } Definitions.Add("WITH_FLEX=1"); if (Target.bCompileNvFlexD3D) { Definitions.Add("WITH_FLEX_DX=1"); Definitions.Add("WITH_FLEX_CUDA=0"); } if (Target.bCompileNvFlexCUDA) { Definitions.Add("WITH_FLEX_CUDA=1"); Definitions.Add("WITH_FLEX_DX=0"); } string FLEXDir = Target.UEThirdPartySourceDirectory + "PhysX/FLEX-1.1.0/"; string FLEXLibDir = FLEXDir + "lib"; PublicIncludePaths.Add(FLEXDir + "include"); PublicSystemIncludePaths.Add(FLEXDir + "include"); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(FLEXLibDir + "/win64"); if (Target.bCompileNvFlexCUDA) { if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) { PublicAdditionalLibraries.Add("NvFlexDebugCUDA_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexDebugCUDA_x64.dll"); PublicAdditionalLibraries.Add("NvFlexExtDebugCUDA_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexExtDebugCUDA_x64.dll"); PublicAdditionalLibraries.Add("NvFlexDeviceDebug_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexDeviceDebug_x64.dll"); } else { PublicAdditionalLibraries.Add("NvFlexReleaseCUDA_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexReleaseCUDA_x64.dll"); PublicAdditionalLibraries.Add("NvFlexExtReleaseCUDA_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexExtReleaseCUDA_x64.dll"); PublicAdditionalLibraries.Add("NvFlexDeviceRelease_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexDeviceRelease_x64.dll"); } } if (Target.bCompileNvFlexD3D) { if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) { PublicAdditionalLibraries.Add("NvFlexDebugD3D_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexDebugD3D_x64.dll"); PublicAdditionalLibraries.Add("NvFlexExtDebugD3D_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexExtDebugD3D_x64.dll"); } else { PublicAdditionalLibraries.Add("NvFlexReleaseD3D_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexReleaseD3D_x64.dll"); PublicAdditionalLibraries.Add("NvFlexExtReleaseD3D_x64.lib"); PublicDelayLoadDLLs.Add("NvFlexExtReleaseD3D_x64.dll"); } } PublicLibraryPaths.Add(FLEXDir + "/Win64"); string FlexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/FLEX-1.1.0/Win64/"); if (Target.bCompileNvFlexCUDA) { string[] RuntimeDependenciesX64 = { "nvToolsExt64_1.dll", "cudart64_80.dll", "NvFlexDebugCUDA_x64.dll", "NvFlexReleaseCUDA_x64.dll", "NvFlexExtDebugCUDA_x64.dll", "NvFlexExtReleaseCUDA_x64.dll", "NvFlexDeviceRelease_x64.dll", }; foreach (string RuntimeDependency in RuntimeDependenciesX64) { RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency)); } } if (Target.bCompileNvFlexD3D) { string[] RuntimeDependenciesX64 = { "nvToolsExt64_1.dll", "amd_ags_x64.dll", "NvFlexDebugD3D_x64.dll", "NvFlexReleaseD3D_x64.dll", "NvFlexExtDebugD3D_x64.dll", "NvFlexExtReleaseD3D_x64.dll", }; foreach (string RuntimeDependency in RuntimeDependenciesX64) { RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency)); } } } else if (Target.Platform == UnrealTargetPlatform.Win32) { PublicLibraryPaths.Add(FLEXLibDir + "/win32"); if (Target.bCompileNvFlexCUDA) { if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) { PublicAdditionalLibraries.Add("NvFlexDebugCUDA_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexDebugCUDA_x86.dll"); PublicAdditionalLibraries.Add("NvFlexExtDebugCUDA_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexExtDebugCUDA_x86.dll"); PublicAdditionalLibraries.Add("NvFlexDeviceDebug_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexDeviceDebug_x86.dll"); } else { PublicAdditionalLibraries.Add("NvFlexReleaseCUDA_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexReleaseCUDA_x86.dll"); PublicAdditionalLibraries.Add("NvFlexExtReleaseCUDA_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexExtReleaseCUDA_x86.dll"); PublicAdditionalLibraries.Add("NvFlexDeviceRelease_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexDeviceRelease_x86.dll"); } } if (Target.bCompileNvFlexD3D) { if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) { PublicAdditionalLibraries.Add("NvFlexDebugD3D_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexDebugD3D_x86.dll"); PublicAdditionalLibraries.Add("NvFlexExtDebugD3D_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexExtDebugD3D_x86.dll"); } else { PublicAdditionalLibraries.Add("NvFlexReleaseD3D_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexReleaseD3D_x86.dll"); PublicAdditionalLibraries.Add("NvFlexExtReleaseD3D_x86.lib"); PublicDelayLoadDLLs.Add("NvFlexExtReleaseD3D_x86.dll"); } } PublicLibraryPaths.Add(FLEXDir + "/Win32"); string FlexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/FLEX-1.1.0/Win32/"); if (Target.bCompileNvFlexCUDA) { string[] RuntimeDependenciesX86 = { "nvToolsExt32_1.dll", "cudart32_80.dll", "NvFlexDebugCUDA_x86.dll", "NvFlexReleaseCUDA_x86.dll", "NvFlexExtDebugCUDA_x86.dll", "NvFlexExtReleaseCUDA_x86.dll", "NvFlexDeviceRelease_x86.dll", }; foreach (string RuntimeDependency in RuntimeDependenciesX86) { RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency)); } } if (Target.bCompileNvFlexD3D) { string[] RuntimeDependenciesX86 = { "nvToolsExt32_1.dll", "amd_ags_x86.dll", "NvFlexDebugD3D_x86.dll", "NvFlexReleaseD3D_x86.dll", "NvFlexExtDebugD3D_x86.dll", "NvFlexExtReleaseD3D_x86.dll", }; foreach (string RuntimeDependency in RuntimeDependenciesX86) { RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency)); } } } }
public DirectXMesh(ReadOnlyTargetRules Target) : base(Target) { // We are just setting up paths for pre-compiled binaries. Type = ModuleType.External; // For boost:: and TBB:: code bEnableUndefinedIdentifierWarnings = false; bUseRTTI = true; // For testing during developement bool bDebugPaths = true; // Only building for Windows if (Target.Platform == UnrealTargetPlatform.Win64) { string HeaderDir = ModuleDirectory + "/DirectXMeshCode/DirectXMesh"; if (bDebugPaths) { if (!Directory.Exists(HeaderDir)) { string Err = string.Format("UVAtlas SDK not found in {0}", HeaderDir); System.Console.WriteLine(Err); throw new BuildException(Err); } } PublicIncludePaths.Add(HeaderDir); // Construct the OpenVDB directory name string LibDirName = ModuleDirectory + "/Deploy/"; LibDirName += "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/lib/x64/"; bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT); if (bDebug) { LibDirName += "Debug/"; } else { LibDirName += "Release/"; } if (bDebugPaths) { // Look for the file if (!File.Exists(LibDirName + "DirectXMesh.lib")) { string Err = string.Format("DirectXMesh.lib not found in {0}", LibDirName); System.Console.WriteLine(Err); throw new BuildException(Err); } } PublicLibraryPaths.Add(LibDirName); PublicAdditionalLibraries.Add("DirectXMesh.lib"); } else { string Err = "Wrong build env!"; System.Console.WriteLine(Err); throw new BuildException(Err); } }
public zlib(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string zlibPath = Target.UEThirdPartySourceDirectory + "zlib/v1.2.8/"; // TODO: recompile for consoles and mobile platforms string OldzlibPath = Target.UEThirdPartySourceDirectory + "zlib/zlib-1.2.5/"; if (Target.Platform == UnrealTargetPlatform.Win64) { string platform = "/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicIncludePaths.Add(zlibPath + "include" + platform); PublicLibraryPaths.Add(zlibPath + "lib" + platform); PublicAdditionalLibraries.Add("zlibstatic.lib"); } else if (Target.Platform == UnrealTargetPlatform.Win32) { string platform = "/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicIncludePaths.Add(zlibPath + "include" + platform); PublicLibraryPaths.Add(zlibPath + "lib" + platform); PublicAdditionalLibraries.Add("zlibstatic.lib"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string platform = "/Mac/"; PublicIncludePaths.Add(zlibPath + "include" + platform); // OSX needs full path PublicAdditionalLibraries.Add(zlibPath + "lib" + platform + "libz.a"); } else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS) { PublicIncludePaths.Add(OldzlibPath + "Inc"); PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicIncludePaths.Add(OldzlibPath + "Inc"); PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { string OpimizationSuffix = ""; if (Target.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } PublicIncludePaths.Add(OldzlibPath + "Inc"); PublicAdditionalLibraries.Add(OldzlibPath + "Lib/HTML5/zlib" + OpimizationSuffix + ".bc"); } else if (Target.Platform == UnrealTargetPlatform.Linux) { string platform = "/Linux/" + Target.Architecture; PublicIncludePaths.Add(zlibPath + "include" + platform); PublicAdditionalLibraries.Add(zlibPath + "/lib/" + platform + ((Target.LinkType == TargetLinkType.Monolithic) ? "/libz" : "/libz_fPIC") + ".a"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicIncludePaths.Add(OldzlibPath + "Inc"); PublicLibraryPaths.Add(OldzlibPath + "Lib/PS4"); PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Use reflection to allow type not to exist if console code is not present System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool"); if (XboxOnePlatformType != null) { System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null); PublicIncludePaths.Add(OldzlibPath + "Inc"); PublicLibraryPaths.Add(OldzlibPath + "Lib/XboxOne/VS" + VersionName.ToString()); PublicAdditionalLibraries.Add("zlib125_XboxOne.lib"); } } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicIncludePaths.Add(OldzlibPath + "inc"); PublicAdditionalLibraries.Add(System.IO.Path.Combine(OldzlibPath, "Lib/Switch/libz.a")); } }
public UnrealLightmass(TargetInfo Target) { PublicIncludePaths.Add("Runtime/Launch/Public"); PrivateDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "zlib", "SwarmInterface", "Projects" }); Definitions.Add("UE_LIGHTMASS=1"); if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { AddEngineThirdPartyPrivateStaticDependencies(Target, "DX9"); // Unreallightmass requires GetProcessMemoryInfo exported by psapi.dll. http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx PublicAdditionalLibraries.Add("psapi.lib"); PrivateDependencyModuleNames.AddRange( new string[] { "Messaging", } ); } else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux) { // On Mac/Linux UnrealLightmass is executed locally and communicates with the editor using Messaging module instead of SwarmAgent // @todo: allow for better plug-in support in standalone Slate apps PrivateDependencyModuleNames.AddRange( new string[] { "Networking", "Sockets", "Messaging", "UdpMessaging", } ); PrivateIncludePathModuleNames.AddRange( new string[] { "Messaging", } ); } // Lightmass ray tracing is 8% faster with buffer security checks disabled due to fixed size arrays on the stack in the kDOP ray tracing functions // Warning: This means buffer overwrites will not be detected bEnableBufferSecurityChecks = false; PrivateIncludePaths.Add("Runtime/Launch/Private"); // For LaunchEngineLoop.cpp include PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/Launch"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/ImportExport"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/CPUSolver"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/Lighting"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Misc"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Math"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Templates"); PrivateIncludePaths.Add("Programs/UnrealLightmass/Private/LightmassCore/Types"); // EMBREE if (Target.Platform == UnrealTargetPlatform.Win64) { string SDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelEmbree/Embree270/Win64/"; PublicIncludePaths.Add(SDKDir + "include"); PublicLibraryPaths.Add(SDKDir + "lib"); PublicAdditionalLibraries.Add("embree.lib"); RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Win64/embree.dll")); RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Win64/tbb.dll")); RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Win64/tbbmalloc.dll")); Definitions.Add("USE_EMBREE=1"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string SDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelEmbree/Embree270/MacOSX/"; PublicIncludePaths.Add(SDKDir + "include"); PublicAdditionalLibraries.Add(SDKDir + "lib/libembree.2.dylib"); RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Mac/libembree.2.dylib")); RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Mac/libtbb.dylib")); RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Mac/libtbbmalloc.dylib")); Definitions.Add("USE_EMBREE=1"); } else { Definitions.Add("USE_EMBREE=0"); } }