public LandscapeEditor(ReadOnlyTargetRules Target) : base(Target) { PrivateDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Slate", "SlateCore", "EditorStyle", "Engine", "Landscape", "RenderCore", "RHI", "InputCore", "UnrealEd", "PropertyEditor", "ImageWrapper", "EditorWidgets", "Foliage", "ViewportInteraction", "VREditor", } ); CircularlyReferencedDependentModules.AddRange( new string[] { "ViewportInteraction", "VREditor" } ); PrivateIncludePathModuleNames.AddRange( new string[] { "MainFrame", "DesktopPlatform", "ContentBrowser", "AssetTools", "LevelEditor" } ); DynamicallyLoadedModuleNames.AddRange( new string[] { "MainFrame", "DesktopPlatform", } ); if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32) { // VS2015 updated some of the CRT definitions but not all of the Windows SDK has been updated to match. // Microsoft provides this shim library to enable building with VS2015 until they fix everything up. //@todo: remove when no longer neeeded (no other code changes should be necessary). if (WindowsPlatform.bNeedsLegacyStdioDefinitionsLib) { PublicAdditionalLibraries.Add("legacy_stdio_definitions.lib"); } } // KissFFT is used by the smooth tool. if (UEBuildConfiguration.bCompileLeanAndMeanUE == false && (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)) { AddEngineThirdPartyPrivateStaticDependencies(Target, "Kiss_FFT"); } else { Definitions.Add("WITH_KISSFFT=0"); } }
public APEX(TargetInfo Target) { Type = ModuleType.External; // Determine which kind of libraries to link against APEXLibraryMode LibraryMode = GetAPEXLibraryMode(Target.Configuration); string LibrarySuffix = GetAPEXLibrarySuffix(LibraryMode); Definitions.Add("WITH_APEX=1"); string APEXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/APEX-1.3/"; string APEXLibDir = APEXDir + "lib"; PublicSystemIncludePaths.AddRange( new string[] { APEXDir + "public", APEXDir + "framework/public", APEXDir + "framework/public/PhysX3", APEXDir + "module/destructible/public", APEXDir + "module/clothing/public", APEXDir + "module/legacy/public", APEXDir + "NxParameterized/public", } ); // List of default library names (unused unless LibraryFormatString is non-null) List <string> ApexLibraries = new List <string>(); ApexLibraries.AddRange( new string[] { "ApexCommon{0}", "ApexFramework{0}", "ApexShared{0}", "APEX_Destructible{0}", "APEX_Clothing{0}", }); string LibraryFormatString = null; // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { APEXLibDir += "/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(APEXLibDir); PublicAdditionalLibraries.Add(String.Format("APEXFramework{0}_x64.lib", LibrarySuffix)); PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_x64.dll", LibrarySuffix)); string[] RuntimeDependenciesX64 = { "APEX_Clothing{0}_x64.dll", "APEX_Destructible{0}_x64.dll", "APEX_Legacy{0}_x64.dll", "ApexFramework{0}_x64.dll", }; string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/APEX-1.3/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string RuntimeDependency in RuntimeDependenciesX64) { string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix); RuntimeDependencies.Add(new RuntimeDependency(FileName)); RuntimeDependencies.Add(new RuntimeDependency(FileName + ".pdb", true)); } } else if (Target.Platform == UnrealTargetPlatform.Win32) { APEXLibDir += "/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(APEXLibDir); PublicAdditionalLibraries.Add(String.Format("APEXFramework{0}_x86.lib", LibrarySuffix)); PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_x86.dll", LibrarySuffix)); string[] RuntimeDependenciesX86 = { "APEX_Clothing{0}_x86.dll", "APEX_Destructible{0}_x86.dll", "APEX_Legacy{0}_x86.dll", "ApexFramework{0}_x86.dll", }; string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/APEX-1.3/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string RuntimeDependency in RuntimeDependenciesX86) { string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix); RuntimeDependencies.Add(new RuntimeDependency(FileName)); RuntimeDependencies.Add(new RuntimeDependency(FileName + ".pdb", true)); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { APEXLibDir += "/osx64"; Definitions.Add("APEX_STATICALLY_LINKED=1"); ApexLibraries.Add("APEX_Legacy{0}"); LibraryFormatString = APEXLibDir + "/lib{0}" + ".a"; } else if (Target.Platform == UnrealTargetPlatform.Linux) { APEXLibDir += "/Linux/" + Target.Architecture; Definitions.Add("APEX_STATICALLY_LINKED=1"); ApexLibraries.Add("APEX_Legacy{0}"); LibraryFormatString = APEXLibDir + "/lib{0}" + ".a"; } else if (Target.Platform == UnrealTargetPlatform.PS4) { Definitions.Add("APEX_STATICALLY_LINKED=1"); Definitions.Add("WITH_APEX_LEGACY=0"); APEXLibDir += "/PS4"; PublicLibraryPaths.Add(APEXLibDir); LibraryFormatString = "{0}"; } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Use reflection to allow type not to exist if console code is not present System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool"); if (XboxOnePlatformType != null) { Definitions.Add("APEX_STATICALLY_LINKED=1"); Definitions.Add("WITH_APEX_LEGACY=0"); // This MUST be defined for XboxOne! Definitions.Add("PX_HAS_SECURE_STRCPY=1"); System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null); APEXLibDir += "/XboxOne/VS" + VersionName.ToString(); PublicLibraryPaths.Add(APEXLibDir); LibraryFormatString = "{0}.lib"; } } // Add the libraries needed (used for all platforms except Windows) if (LibraryFormatString != null) { foreach (string Lib in ApexLibraries) { string ConfiguredLib = String.Format(Lib, LibrarySuffix); string FinalLib = String.Format(LibraryFormatString, ConfiguredLib); PublicAdditionalLibraries.Add(FinalLib); } } }
public ICU(TargetInfo Target) { Type = ModuleType.External; string ICURootPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "ICU/icu4c-53_1/"; // Includes PublicSystemIncludePaths.Add(ICURootPath + "include" + "/"); string PlatformFolderName = Target.Platform.ToString(); string TargetSpecificPath = ICURootPath + PlatformFolderName + "/"; if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") { TargetSpecificPath = ICURootPath + "Win32/"; } if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); TargetSpecificPath += VSVersionFolderName + "/"; string[] LibraryNameStems = { "dt", // Data "uc", // Unicode Common "in", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; // Library Paths PublicLibraryPaths.Add(TargetSpecificPath + "lib" + "/"); EICULinkType ICULinkType = Target.IsMonolithic ? EICULinkType.Static : EICULinkType.Dynamic; switch (ICULinkType) { case EICULinkType.Static: foreach (string Stem in LibraryNameStems) { string LibraryName = "sicu" + Stem + LibraryNamePostfix + "." + "lib"; PublicAdditionalLibraries.Add(LibraryName); } break; case EICULinkType.Dynamic: foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix + "." + "lib"; PublicAdditionalLibraries.Add(LibraryName); } foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix + "53" + "." + "dll"; PublicDelayLoadDLLs.Add(LibraryName); } break; } } else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Android) { string StaticLibraryExtension = "a"; switch (Target.Platform) { case UnrealTargetPlatform.Linux: TargetSpecificPath += Target.Architecture + "/"; break; case UnrealTargetPlatform.Android: PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib"); PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib"); PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib"); PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib"); break; } string[] LibraryNameStems = { "data", // Data "uc", // Unicode Common "i18n", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; // Library Paths EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic; switch (ICULinkType) { case EICULinkType.Static: foreach (string Stem in LibraryNameStems) { string LibraryName = "icu" + Stem + LibraryNamePostfix; if (Target.Platform == UnrealTargetPlatform.Android) { // we will filter out in the toolchain PublicAdditionalLibraries.Add(LibraryName); // Android requires only the filename. } else { PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension); // Linux seems to need the path, not just the filename. } } break; case EICULinkType.Dynamic: foreach (string Stem in LibraryNameStems) { if (Target.Platform == UnrealTargetPlatform.Linux) { string LibraryName = "icu" + Stem + LibraryNamePostfix; string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/"; PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryName); } } break; } } else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS) { string StaticLibraryExtension = "a"; string DynamicLibraryExtension = "dylib"; string[] LibraryNameStems = { "data", // Data "uc", // Unicode Common "i18n", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.IOS || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic; // Library Paths switch (ICULinkType) { case EICULinkType.Static: foreach (string Stem in LibraryNameStems) { string LibraryName = "libicu" + Stem + LibraryNamePostfix + "." + StaticLibraryExtension; PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + LibraryName); if (Target.Platform == UnrealTargetPlatform.IOS) { PublicAdditionalShadowFiles.Add(TargetSpecificPath + "lib/" + LibraryName); } } break; case EICULinkType.Dynamic: foreach (string Stem in LibraryNameStems) { if (Target.Platform == UnrealTargetPlatform.Mac) { string LibraryName = "libicu" + Stem + ".53.1" + LibraryNamePostfix + "." + DynamicLibraryExtension; string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName; PublicDelayLoadDLLs.Add(LibraryPath); PublicAdditionalShadowFiles.Add(LibraryPath); } else if (Target.Platform == UnrealTargetPlatform.Linux) { string LibraryName = "icu" + Stem + LibraryNamePostfix; string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/"; PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryName); } } 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 }; foreach (string Stem in LibraryNameStems) { string LibraryName = "libicu" + Stem + "." + 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.XboxOne) { string LibraryNamePrefix = "sicu"; string[] LibraryNameStems = { "dt", // Data "uc", // Unicode Common "in", // Internationalization "le", // Layout Engine "lx", // Layout Extensions "io" // Input/Output }; string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty; string LibraryExtension = "lib"; foreach (string Stem in LibraryNameStems) { string LibraryName = ICURootPath + "XboxOne/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension; PublicAdditionalLibraries.Add(LibraryName); } } // common defines if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Android) || (Target.Platform == UnrealTargetPlatform.Mac) || (Target.Platform == UnrealTargetPlatform.IOS) || (Target.Platform == UnrealTargetPlatform.PS4) || (Target.Platform == UnrealTargetPlatform.XboxOne) || (Target.Platform == UnrealTargetPlatform.HTML5)) { // Definitions Definitions.Add("U_USING_ICU_NAMESPACE=0"); // Disables a using declaration for namespace "icu". Definitions.Add("U_STATIC_IMPLEMENTATION"); // Necessary for linking to ICU statically. Definitions.Add("U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"); // Disables unnecessary inclusion of headers - inclusions are for ease of use. Definitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit"); // Makes UnicodeString constructors for ICU character types explicit. Definitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit. Definitions.Add("UCONFIG_NO_TRANSLITERATION=1"); // Disables declarations and compilation of unused ICU transliteration functionality. } if (Target.Platform == UnrealTargetPlatform.PS4) { // Definitions Definitions.Add("ICU_NO_USER_DATA_OVERRIDE=1"); Definitions.Add("U_PLATFORM=U_PF_ORBIS"); } if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Definitions Definitions.Add("ICU_NO_USER_DATA_OVERRIDE=1"); Definitions.Add("U_PLATFORM=U_PF_DURANGO"); } }
public libOpus(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; PublicIncludePaths.Add(OpusIncPath); string LibraryPath = OpusLibPath + "/"; if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { LibraryPath += "Windows/VS2012/"; if (Target.Platform == UnrealTargetPlatform.Win64) { LibraryPath += "x64/"; } else { LibraryPath += "win32/"; } LibraryPath += "Release/"; PublicAdditionalLibraries.Add(LibraryPath + "silk_common.lib"); PublicAdditionalLibraries.Add(LibraryPath + "silk_float.lib"); PublicAdditionalLibraries.Add(LibraryPath + "celt.lib"); PublicAdditionalLibraries.Add(LibraryPath + "opus.lib"); PublicAdditionalLibraries.Add(LibraryPath + "speex_resampler.lib"); } else if (Target.Platform == UnrealTargetPlatform.HoloLens) { if (Target.WindowsPlatform.Architecture == WindowsArchitecture.x64) { LibraryPath += "Windows/VS2012/"; LibraryPath += "x64/"; } else if (Target.WindowsPlatform.Architecture == WindowsArchitecture.x86) { LibraryPath += "Windows/VS2012/"; LibraryPath += "win32/"; } else if (Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM32) { LibraryPath += "Windows/VS" + (Target.WindowsPlatform.Compiler >= WindowsCompiler.VisualStudio2015_DEPRECATED ? "2015" : "2012"); LibraryPath += "/ARM/"; } else if (Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM64) { LibraryPath += "Windows/VS" + (Target.WindowsPlatform.Compiler >= WindowsCompiler.VisualStudio2015_DEPRECATED ? "2015" : "2012"); LibraryPath += "/ARM64/"; } LibraryPath += "Release/"; PublicAdditionalLibraries.Add(LibraryPath + "silk_common.lib"); PublicAdditionalLibraries.Add(LibraryPath + "silk_float.lib"); PublicAdditionalLibraries.Add(LibraryPath + "celt.lib"); PublicAdditionalLibraries.Add(LibraryPath + "opus.lib"); PublicAdditionalLibraries.Add(LibraryPath + "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)) { string[] Architectures = new string[] { "ARMv7", "ARM64", "x64", }; foreach (string Architecture in Architectures) { PublicAdditionalLibraries.Add(LibraryPath + "Android/" + Architecture + "/libopus.a"); PublicAdditionalLibraries.Add(LibraryPath + "Android/" + Architecture + "/libspeex_resampler.a"); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { LibraryPath += "XboxOne/VS2015/Release/"; PublicAdditionalLibraries.Add(LibraryPath + "silk_common.lib"); PublicAdditionalLibraries.Add(LibraryPath + "silk_float.lib"); PublicAdditionalLibraries.Add(LibraryPath + "celt.lib"); PublicAdditionalLibraries.Add(LibraryPath + "opus.lib"); PublicAdditionalLibraries.Add(LibraryPath + "speex_resampler.lib"); } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicAdditionalLibraries.Add(LibraryPath + "Switch/libOpus-1.1/NX64/Release/" + "libOpus-1.1.a"); } }
public bool LoadModio(ReadOnlyTargetRules Target) { bool isLibrarySupported = false; if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { PublicDefinitions.Add("MODIO_UE4_WINDOWS_BUILD"); isLibrarySupported = true; string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "win64"); string DLLPath = Path.Combine(ThirdPartyPath, modio_directory, "bin", "win64"); PublicLibraryPaths.Add(LibrariesPath); PublicAdditionalLibraries.Add("modio.lib"); RuntimeDependencies.Add(Path.Combine(DLLPath, "modio.dll")); string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Win64"); if (!Directory.Exists(ProjectBinariesDirectory)) { System.IO.Directory.CreateDirectory(ProjectBinariesDirectory); } string ModioDLLDestination = System.IO.Path.Combine(ProjectBinariesDirectory, "modio.dll"); CopyFile(Path.Combine(DLLPath, "modio.dll"), ModioDLLDestination); PublicDelayLoadDLLs.AddRange(new string[] { "modio.dll" }); } if (Target.Platform == UnrealTargetPlatform.Linux) { PublicDefinitions.Add("MODIO_UE4_LINUX_BUILD"); isLibrarySupported = true; string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "linux-x64"); PublicLibraryPaths.Add(LibrariesPath); PublicAdditionalLibraries.Add("modio"); string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Linux"); if (!Directory.Exists(ProjectBinariesDirectory)) { System.IO.Directory.CreateDirectory(ProjectBinariesDirectory); } } if (Target.Platform == UnrealTargetPlatform.Mac) { PublicDefinitions.Add("MODIO_UE4_MAC_BUILD"); isLibrarySupported = true; string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "macOS-x64"); PublicLibraryPaths.Add(LibrariesPath); PublicAdditionalLibraries.Add("modio"); string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Mac"); if (!Directory.Exists(ProjectBinariesDirectory)) { System.IO.Directory.CreateDirectory(ProjectBinariesDirectory); } } if (isLibrarySupported) { string ModioIncludePath = Path.Combine(ThirdPartyPath, modio_directory, "include"); string AdditionalDependenciesPath = Path.Combine(ThirdPartyPath, modio_directory, "additional_dependencies"); PublicIncludePaths.Add(ModioIncludePath); PublicIncludePaths.Add(AdditionalDependenciesPath); } return(isLibrarySupported); }
public SQLiteSupport(TargetInfo 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 = "" + UEBuildConfiguration.UEThirdPartySourceDirectory + "sqlite/lib/" + PlatformName + ConfigurationName; string LibraryFilename = Path.Combine(LibraryPath, "sqlite" + UEBuildPlatform.GetBuildPlatform(Target.Platform).GetBinaryExtension(UEBuildBinaryType.StaticLibrary)); if (!File.Exists(LibraryFilename)) { throw new BuildException("Please refer to the Engine/Source/ThirdParty/sqlite/README.txt file prior to enabling this module."); } PublicIncludePaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "sqlite/sqlite/"); PublicDependencyModuleNames.AddRange( new string[] { "Core", "DatabaseSupport", } ); // Lib file PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryFilename); }
public KinectPlugin(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { "KinectPlugin/Public", Path.Combine(ThirdPartyPath, "Kinect/include") // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "KinectPlugin/Private", // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "Slate", "SlateCore" // ... 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 ... } ); if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86"; PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Kinect/lib", PlatformString, "Kinect20.lib")); //RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(ThirdPartyPath, "Kinect/lib", PlatformString, "Kinect20.dll"))); RuntimeDependencies.Add(Path.Combine(ThirdPartyPath, "Kinect/lib", PlatformString, "Kinect20.dll")); } }
public OpenSSL(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string OpenSSL101sPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1_0_1s"); string OpenSSL111Path = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.1.1"); string OpenSSL111dPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.1.1c"); string PlatformSubdir = Target.Platform.ToString(); string ConfigFolder = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" : "Release"; if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS) { PublicIncludePaths.Add(Path.Combine(OpenSSL111Path, "Include", PlatformSubdir)); string LibPath = Path.Combine(OpenSSL111Path, "Lib", PlatformSubdir); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.a")); } else if (Target.Platform == UnrealTargetPlatform.PS4) { string IncludePath = Target.UEThirdPartySourceDirectory + "OpenSSL/1.0.2g" + "/" + "include/PS4"; string LibraryPath = Target.UEThirdPartySourceDirectory + "OpenSSL/1.0.2g" + "/" + "lib/PS4/release"; PublicIncludePaths.Add(IncludePath); PublicAdditionalLibraries.Add(LibraryPath + "/" + "libssl.a"); PublicAdditionalLibraries.Add(LibraryPath + "/" + "libcrypto.a"); } else if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.HoloLens) { // Our OpenSSL 1.1.1 libraries are built with zlib compression support PrivateDependencyModuleNames.Add("zlib"); string VSVersion = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); // Add includes PublicIncludePaths.Add(Path.Combine(OpenSSL111Path, "include", PlatformSubdir, VSVersion)); // Add Libs string LibPath = Path.Combine(OpenSSL111Path, "lib", PlatformSubdir, VSVersion, ConfigFolder); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.lib")); PublicSystemLibraries.Add("crypt32.lib"); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { string platform = "/Linux/" + Target.Architecture; string IncludePath = OpenSSL111dPath + "/include" + platform; string LibraryPath = OpenSSL111dPath + "/lib" + platform; PublicIncludePaths.Add(IncludePath); PublicAdditionalLibraries.Add(LibraryPath + "/libssl.a"); PublicAdditionalLibraries.Add(LibraryPath + "/libcrypto.a"); PublicDependencyModuleNames.Add("zlib"); // PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.Lumin) { string IncludePath = OpenSSL101sPath + "/include/Android"; PublicIncludePaths.Add(IncludePath); // unneeded since included in libcurl // string LibPath = Path.Combine(OpenSSL101sPath, "lib", PlatformSubdir); //PublicLibraryPaths.Add(LibPath); } }
public OpenSSL(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string OpenSSL101sPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1_0_1s"); string OpenSSL102hPath = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1_0_2h"); string OpenSSL102Path = Path.Combine(Target.UEThirdPartySourceDirectory, "OpenSSL", "1.0.2g"); string PlatformSubdir = Target.Platform.ToString(); string ConfigFolder = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "Debug" : "Release"; if (Target.Platform == UnrealTargetPlatform.Mac) { PublicIncludePaths.Add(Path.Combine(OpenSSL102Path, "include", PlatformSubdir)); string LibPath = Path.Combine(OpenSSL102Path, "lib", PlatformSubdir, ConfigFolder); //PublicLibraryPaths.Add(LibPath); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libssl.a")); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libcrypto.a")); PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { string IncludePath = Target.UEThirdPartySourceDirectory + "OpenSSL/1.0.2g" + "/" + "include/PS4"; string LibraryPath = Target.UEThirdPartySourceDirectory + "OpenSSL/1.0.2g" + "/" + "lib/PS4/release"; PublicIncludePaths.Add(IncludePath); PublicAdditionalLibraries.Add(LibraryPath + "/" + "libssl.a"); PublicAdditionalLibraries.Add(LibraryPath + "/" + "libcrypto.a"); } else if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32) { string LibPath = Path.Combine(OpenSSL102Path, "lib", PlatformSubdir, "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); string LibPostfixAndExt = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d.lib" : ".lib"; PublicIncludePaths.Add(Path.Combine(OpenSSL102Path, "include", PlatformSubdir, "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName())); PublicLibraryPaths.Add(LibPath); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libeay" + LibPostfixAndExt)); PublicAdditionalLibraries.Add(Path.Combine(LibPath, "ssleay" + LibPostfixAndExt)); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { string platform = "/Linux/" + Target.Architecture; string IncludePath = OpenSSL102hPath + "/include" + platform; string LibraryPath = OpenSSL102hPath + "/lib" + platform; PublicIncludePaths.Add(IncludePath); PublicLibraryPaths.Add(LibraryPath); PublicAdditionalLibraries.Add(LibraryPath + "/libssl.a"); PublicAdditionalLibraries.Add(LibraryPath + "/libcrypto.a"); PublicDependencyModuleNames.Add("zlib"); // PublicAdditionalLibraries.Add("z"); } else if (Target.Platform == UnrealTargetPlatform.Android) { string IncludePath = OpenSSL101sPath + "/include/Android"; PublicIncludePaths.Add(IncludePath); // unneeded since included in libcurl // string LibPath = Path.Combine(OpenSSL101sPath, "lib", PlatformSubdir); //PublicLibraryPaths.Add(LibPath); } else if (Target.Platform == UnrealTargetPlatform.IOS) { string IncludePath = OpenSSL101sPath + "/include/IOS"; string LibraryPath = OpenSSL101sPath + "/lib/IOS"; PublicIncludePaths.Add(IncludePath); PublicAdditionalLibraries.Add(LibraryPath + "/libssl.a"); PublicAdditionalLibraries.Add(LibraryPath + "/libcrypto.a"); } }
public ARToolkit(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; //string SDKDIR = Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); string SDKDIR = ModuleDirectory; SDKDIR = SDKDIR.Replace("\\", "/"); if (Target.Platform == UnrealTargetPlatform.Mac) { PublicIncludePaths.Add(SDKDIR + "/include/OSX/"); string LibPath = SDKDIR + "/lib/OSX/"; PublicAdditionalLibraries.Add(LibPath + "macosx-universal/libjpeg.a"); PublicAdditionalLibraries.Add(LibPath + "libAR.a"); PublicAdditionalLibraries.Add(LibPath + "libAR2.a"); PublicAdditionalLibraries.Add(LibPath + "libARICP.a"); PublicAdditionalLibraries.Add(LibPath + "libKPM.a"); PublicAdditionalLibraries.Add(LibPath + "libARUtil.a"); PublicAdditionalLibraries.Add(LibPath + "libARMulti.a"); PublicAdditionalLibraries.Add(LibPath + "libARvideo.a"); PublicAdditionalLibraries.Add(LibPath + "libEden.a"); PublicAdditionalLibraries.Add(LibPath + "libARgsub.a"); PublicAdditionalLibraries.Add(LibPath + "libARgsub_lite.a"); PublicFrameworks.AddRange( new string[] { "QTKit", "CoreVideo", "Accelerate" } ); } else if (Target.Platform == UnrealTargetPlatform.IOS) { PublicIncludePaths.Add(SDKDIR + "/include/iOS/"); string LibPath = SDKDIR + "/lib/iOS/"; PublicAdditionalLibraries.Add(LibPath + "libKPM.a"); PublicAdditionalLibraries.Add(LibPath + "ios511/libjpeg.a"); PublicAdditionalLibraries.Add(LibPath + "libAR.a"); PublicAdditionalLibraries.Add(LibPath + "libAR2.a"); PublicAdditionalLibraries.Add(LibPath + "libARICP.a"); PublicAdditionalLibraries.Add(LibPath + "libARUtil.a"); PublicAdditionalLibraries.Add(LibPath + "libARMulti.a"); PublicAdditionalLibraries.Add(LibPath + "libARvideo.a"); PublicAdditionalLibraries.Add(LibPath + "libEden.a"); PublicAdditionalLibraries.Add(LibPath + "libARgsub_es.a"); PublicAdditionalLibraries.Add(LibPath + "libARgsub_es2.a"); PublicAdditionalLibraries.Add(LibPath + "libc++.dylib"); //Need this from IOS SDK PublicFrameworks.AddRange( new string[] { "CoreVideo", "Accelerate", "AVFoundation" } ); } else if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { PublicIncludePaths.Add(SDKDIR + "/include/Windows/"); string LibPath = SDKDIR + "/lib/Win64/vs2015"; /* * switch (Compiler) * { * case WindowsCompiler.VisualStudio2015: * LibPath = SDKDIR + "/lib/Win64/vs2015"; * break; * * default: * throw new BuildException("Unexpected compiler version on Visual Studio 2013 / 2015 is supported!"); * } */ PublicLibraryPaths.Add(LibPath); PublicAdditionalLibraries.AddRange( new string[] { "libjpeg.lib", "pthreadVC2.lib", "ARUtil.lib", "AR.lib", "ARMulti.lib", "AR2.lib", "KPM.lib", "ARvideo.lib", "ARICP.lib" } ); Console.WriteLine("Sdk dir: " + SDKDIR); PublicDelayLoadDLLs.AddRange(new string[] { "DSVL.dll", "ARvideo.dll", "pthreadVC2.dll" }); RuntimeDependencies.Add(SDKDIR + "/../../../../../Binaries/Win64/DSVL.dll"); RuntimeDependencies.Add(SDKDIR + "/../../../../../Binaries/Win64/ARvideo.dll"); RuntimeDependencies.Add(SDKDIR + "/../../../../../Binaries/Win64/pthreadVC2.dll"); } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicIncludePaths.Add(SDKDIR + "/include/Android/"); string LibPathAndroid = SDKDIR + "/lib/Android/armeabi-v7a/"; PublicLibraryPaths.Add(LibPathAndroid); PublicAdditionalLibraries.Add(LibPathAndroid + "libar.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libar2.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libaricp.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libkpm.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libutil.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libarmulti.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libjpeg.a"); PublicAdditionalLibraries.Add(LibPathAndroid + "libc++_shared.so"); } }
public FacebookParse(TargetInfo Target) { PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "Developer/Parse/Private", // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine" // ... 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 ... } ); PrivateIncludePathModuleNames.AddRange( new string[] { "Settings" } ); if (Target.Platform == UnrealTargetPlatform.IOS) { PublicAdditionalFrameworks.Add( new UEBuildFramework( "FacebookSDK", "../../lib/iOS/FacebookSDK.embeddedframework.zip" ) ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "FBSDKCoreKit", "../../lib/iOS/FBSDKCoreKit.embeddedframework.zip" ) ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "FBSDKLoginKit", "../../lib/iOS/FBSDKLoginKit.embeddedframework.zip" ) ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "FBSDKShareKit", "../../lib/iOS/FBSDKShareKit.embeddedframework.zip" ) ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "Parse", "../../lib/iOS/Parse.embeddedframework.zip" ) ); PublicAdditionalFrameworks.Add( new UEBuildFramework( "ParseCrashReporting", "../../lib/iOS/ParseCrashReporting.embeddedframework.zip" ) ); // PublicAdditionalFrameworks.Add( // new UEBuildFramework( // "ParseUI", // "../../lib/iOS/ParseUI.embeddedframework.zip" // ) // ); PublicFrameworks.AddRange( new string[] { "Accounts", "AudioToolbox", "CFNetwork", "CoreGraphics", "CoreLocation", "MobileCoreServices", "QuartzCore", "Social", "Security", "StoreKit", "SystemConfiguration" } ); PublicAdditionalLibraries.Add("sqlite3"); PublicAdditionalLibraries.Add("z"); PublicAdditionalLibraries.Add("stdc++.6"); } }
public llvm(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; if (Target.Platform != UnrealTargetPlatform.Win64) { // Currently we support only Win64 llvm builds. return; } var LLVMVersion = "8"; var TargetArch = "Win64"; var VSVersion = "VS2017"; var RootDirectory = Path.Combine(ModuleDirectory, LLVMVersion); PublicIncludePaths.AddRange( new string[] { Path.Combine(RootDirectory, "include"), }); string LibDir = Path.Combine(RootDirectory, "lib", TargetArch, VSVersion, "Release"); string[] Libs = new string[] { "LLVMAggressiveInstCombine.lib", "LLVMAnalysis.lib", "LLVMAsmPrinter.lib", "LLVMBinaryFormat.lib", "LLVMBitReader.lib", "LLVMBitWriter.lib", "LLVMCodeGen.lib", "LLVMCore.lib", "LLVMDebugInfoCodeView.lib", "LLVMDebugInfoMSF.lib", "LLVMDemangle.lib", "LLVMExecutionEngine.lib", "LLVMGlobalISel.lib", "LLVMInstCombine.lib", "LLVMInterpreter.lib", "LLVMMC.lib", "LLVMMCDisassembler.lib", "LLVMMCJIT.lib", "LLVMMCParser.lib", "LLVMObject.lib", "LLVMProfileData.lib", "LLVMRuntimeDyld.lib", "LLVMScalarOpts.lib", "LLVMSelectionDAG.lib", "LLVMSupport.lib", "LLVMTarget.lib", "LLVMTransformUtils.lib", "LLVMX86AsmPrinter.lib", "LLVMX86CodeGen.lib", "LLVMX86Desc.lib", "LLVMX86Info.lib", "LLVMX86Utils.lib", }; foreach (string Lib in Libs) { PublicAdditionalLibraries.Add(Path.Combine(LibDir, Lib)); } }
public LBMSolverCUDA(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "Renderer", "RenderCore", "RHI", "Projects", "D3D11RHI" // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); // CUDA dependencies: string custom_cuda_lib_include = "libs/CUDASolver/include"; string custom_cuda_lib_lib = "libs/CUDASolver/lib"; PublicIncludePaths.Add(Path.Combine(poject_root_path, custom_cuda_lib_include)); PublicAdditionalLibraries.Add(Path.Combine(poject_root_path, custom_cuda_lib_lib, "LBMSolver.lib")); PublicAdditionalLibraries.Add(Path.Combine(poject_root_path, custom_cuda_lib_lib, "ParallelReduction.lib")); string cuda_path = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5"; string cuda_include = "include"; string cuda_lib = "lib/x64"; PublicIncludePaths.Add(Path.Combine(cuda_path, cuda_include)); //PublicAdditionalLibraries.Add(Path.Combine(cuda_path, cuda_lib, "cudart.lib")); PublicAdditionalLibraries.Add(Path.Combine(cuda_path, cuda_lib, "cudart_static.lib")); // D3D11 (UE) dependencies: string enginePath = Path.GetFullPath(Target.RelativeEnginePath); PrivateIncludePaths.AddRange( new string[] { enginePath + "Source/Runtime/Windows/D3D11RHI/Private/", enginePath + "Source/Runtime/Windows/D3D11RHI/Private/Windows/", enginePath + "Source/Runtime/RHI/Private" } ); PublicIncludePaths.AddRange( new string[] { "Runtime/Windows/D3D11RHI/Public/" } ); //PublicAdditionalLibraries.Add("dxgi.lib"); }
public UnrealEnginePython(TargetInfo Target) #endif { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD"); bFasterWithoutUnity = string.IsNullOrEmpty(enableUnityBuild); PublicIncludePaths.AddRange( new string[] { "UnrealEnginePython/Public", // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "UnrealEnginePython/Private", // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "Sockets", "Networking" // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "InputCore", "Slate", "SlateCore", "MovieScene", "LevelSequence", "HTTP", "UMG", "AppFramework", "RHI", "Voice", "RenderCore", "MovieSceneCapture", "Landscape", "Foliage", "AIModule" // ... add private dependencies that you statically link with here ... } ); #if WITH_FORWARDED_MODULE_RULES_CTOR BuildVersion Version; if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version)) { if (Version.MinorVersion >= 18) { PrivateDependencyModuleNames.Add("ApplicationCore"); } } #endif DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); #if WITH_FORWARDED_MODULE_RULES_CTOR if (Target.bBuildEditor) #else if (UEBuildConfiguration.bBuildEditor) #endif { System.Console.WriteLine("Adding UEPy Editor dependencies"); PrivateDependencyModuleNames.AddRange(new string[] { "UnrealEd", "LevelEditor", "BlueprintGraph", "Projects", "Sequencer", "SequencerWidgets", "AssetTools", "LevelSequenceEditor", "MovieSceneTools", "MovieSceneTracks", "CinematicCamera", "EditorStyle", "GraphEditor", "UMGEditor", "AIGraph", "RawMesh", "DesktopWidgets", "EditorWidgets", "FBX", "Persona", "PropertyEditor", "LandscapeEditor", "MaterialEditor" }); } else { System.Console.WriteLine("Not adding UEPy Editor dependencies"); } if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { if (pythonHome == "") { pythonHome = DiscoverPythonPath(windowsKnownPaths, "Win64"); if (pythonHome == "") { throw new System.Exception("Unable to find Python installation"); } } System.Console.WriteLine("Using Python at: " + pythonHome); PublicIncludePaths.Add(pythonHome); string libPath = GetWindowsPythonLibFile(pythonHome); PublicLibraryPaths.Add(Path.GetDirectoryName(libPath)); PublicAdditionalLibraries.Add(libPath); } else if (Target.Platform == UnrealTargetPlatform.Mac) { if (pythonHome == "") { pythonHome = DiscoverPythonPath(macKnownPaths, "Mac"); if (pythonHome == "") { throw new System.Exception("Unable to find Python installation"); } } System.Console.WriteLine("Using Python at: " + pythonHome); PublicIncludePaths.Add(pythonHome); string libPath = GetMacPythonLibFile(pythonHome); PublicLibraryPaths.Add(Path.GetDirectoryName(libPath)); PublicDelayLoadDLLs.Add(libPath); } else if (Target.Platform == UnrealTargetPlatform.Linux) { if (pythonHome == "") { string includesPath = DiscoverLinuxPythonIncludesPath(); if (includesPath == null) { throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths"); } string libsPath = DiscoverLinuxPythonLibsPath(); if (libsPath == null) { throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths"); } System.Console.WriteLine("Discovered Python includes in " + includesPath); System.Console.WriteLine("Discovered Python lib at " + libsPath); PublicIncludePaths.Add(includesPath); // PublicIncludePaths.Add("/usr/include"); // PublicIncludePaths.Add("/home/a/src/deepdrive-sim-2.1/Plugins/UnrealEnginePython/linux/include"); PublicAdditionalLibraries.Add(libsPath); PublicAdditionalLibraries.AddRange(new string[] { "pthread", "dl", "util", "m" }); RuntimeDependencies.Add(System.IO.Path.Combine(ModuleDirectory, "../../EmbeddedPython/..."), StagedFileType.NonUFS); } else { string[] items = pythonHome.Split(';'); System.Console.WriteLine("Using Python includes from " + items[0]); PublicIncludePaths.Add(items[0]); System.Console.WriteLine("Using Python libs at " + items[1]); PublicAdditionalLibraries.Add(items[1]); } } #if WITH_FORWARDED_MODULE_RULES_CTOR else if (Target.Platform == UnrealTargetPlatform.Android) { PublicIncludePaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/python35/include")); PublicLibraryPaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/armeabi-v7a")); PublicAdditionalLibraries.Add("python3.5m"); string APLName = "UnrealEnginePython_APL.xml"; string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(ModuleDirectory, APLName), Target.RelativeEnginePath); AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", RelAPLPath)); } #endif }
public glTFForUE4(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseSharedPCHs; PublicIncludePaths.AddRange(new [] { "glTFForUE4/Public" }); PrivateIncludePaths.AddRange(new [] { "glTFForUE4/Private", }); PublicDependencyModuleNames.AddRange(new [] { "Core", }); PrivateDependencyModuleNames.AddRange(new [] { "CoreUObject", "Engine", "Slate", "SlateCore", "InputCore", "AssetRegistry", }); 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" + 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" + 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 Core(TargetInfo Target) { SharedPCHHeaderFile = "Runtime/Core/Public/Core.h"; PublicIncludePaths.AddRange( new string[] { "Runtime/Core/Public", "Runtime/Core/Public/Internationalization", "Runtime/Core/Public/Async", "Runtime/Core/Public/Concurrency", "Runtime/Core/Public/Containers", "Runtime/Core/Public/Delegates", "Runtime/Core/Public/GenericPlatform", "Runtime/Core/Public/HAL", "Runtime/Core/Public/Logging", "Runtime/Core/Public/Math", "Runtime/Core/Public/Misc", "Runtime/Core/Public/Modules", "Runtime/Core/Public/Modules/Boilerplate", "Runtime/Core/Public/ProfilingDebugging", "Runtime/Core/Public/Serialization", "Runtime/Core/Public/Serialization/Csv", "Runtime/Core/Public/Stats", "Runtime/Core/Public/Templates", "Runtime/Core/Public/UObject", } ); PrivateIncludePaths.AddRange( new string[] { "Developer/DerivedDataCache/Public", "Runtime/SynthBenchmark/Public", "Runtime/Core/Private", "Runtime/Core/Private/Misc", "Runtime/Core/Private/Serialization/Json", "Runtime/Core/Private/Internationalization", "Runtime/Core/Private/Internationalization/Cultures", "Runtime/Analytics/Public", "Runtime/Engine/Public", } ); PrivateIncludePathModuleNames.AddRange( new string[] { "TargetPlatform", "DerivedDataCache", "InputDevice", "Analytics", "RHI" } ); if (UEBuildConfiguration.bBuildEditor == true) { DynamicallyLoadedModuleNames.Add("SourceCodeAccess"); } if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { PublicIncludePaths.Add("Runtime/Core/Public/Windows"); AddEngineThirdPartyPrivateStaticDependencies(Target, "zlib"); AddEngineThirdPartyPrivateStaticDependencies(Target, "IntelTBB", "XInput" ); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/Mac" }); AddEngineThirdPartyPrivateStaticDependencies(Target, "IntelTBB", "zlib", "OpenGL", "PLCrashReporter" ); PublicFrameworks.AddRange(new string[] { "Cocoa", "Carbon", "IOKit", "Security" }); if (UEBuildConfiguration.bBuildEditor == true) { PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport"); } } else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS) { PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/IOS" }); AddEngineThirdPartyPrivateStaticDependencies(Target, "zlib" ); PublicFrameworks.AddRange(new string[] { "UIKit", "Foundation", "AudioToolbox", "AVFoundation", "GameKit", "StoreKit", "CoreVideo", "CoreMedia", "CoreGraphics", "GameController" }); if (Target.Platform == UnrealTargetPlatform.IOS) { PublicFrameworks.AddRange(new string[] { "CoreMotion" }); } bool bSupportAdvertising = Target.Platform == UnrealTargetPlatform.IOS; if (bSupportAdvertising) { PublicFrameworks.AddRange(new string[] { "iAD" }); } } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicIncludePaths.Add("Runtime/Core/Public/Android"); AddEngineThirdPartyPrivateStaticDependencies(Target, "cxademangle", "zlib" ); } else if ((Target.Platform == UnrealTargetPlatform.Linux)) { PublicIncludePaths.Add("Runtime/Core/Public/Linux"); AddEngineThirdPartyPrivateStaticDependencies(Target, "zlib", "jemalloc", "elftoolchain", "SDL2" ); // Core uses dlopen() PublicAdditionalLibraries.Add("dl"); // We need FreeType2 and GL for the Splash, but only in the Editor if (Target.Type == TargetRules.TargetType.Editor) { AddEngineThirdPartyPrivateStaticDependencies(Target, "FreeType2"); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenGL"); PrivateIncludePathModuleNames.Add("ImageWrapper"); } } else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") { PublicIncludePaths.Add("Runtime/Core/Public/HTML5"); AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2"); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenAL"); } else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32") { AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2"); PrivateDependencyModuleNames.Add("HTML5JS"); PrivateDependencyModuleNames.Add("MapPakDownloader"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicAdditionalLibraries.Add("SceRtc_stub_weak"); //ORBIS SDK rtc.h, used in PS4Time.cpp } if (UEBuildConfiguration.bCompileICU == true) { AddEngineThirdPartyPrivateStaticDependencies(Target, "ICU"); } Definitions.Add("UE_ENABLE_ICU=" + (UEBuildConfiguration.bCompileICU ? "1" : "0")); // Enable/disable (=1/=0) ICU usage in the codebase. NOTE: This flag is for use while integrating ICU and will be removed afterward. // If we're compiling with the engine, then add Core's engine dependencies if (UEBuildConfiguration.bCompileAgainstEngine == true) { if (!UEBuildConfiguration.bBuildRequiresCookedData) { DynamicallyLoadedModuleNames.AddRange(new string[] { "DerivedDataCache" }); } } // On Windows platform, VSPerfExternalProfiler.cpp needs access to "VSPerf.h". This header is included with Visual Studio, but it's not in a standard include path. if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { var VisualStudioVersionNumber = "11.0"; var SubFolderName = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/PerfSDK" : "PerfSDK"; string PerfIncludeDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), String.Format("Microsoft Visual Studio {0}/Team Tools/Performance Tools/{1}", VisualStudioVersionNumber, SubFolderName)); if (File.Exists(Path.Combine(PerfIncludeDirectory, "VSPerf.h"))) { PrivateIncludePaths.Add(PerfIncludeDirectory); Definitions.Add("WITH_VS_PERF_PROFILER=1"); } } if (Target.Platform == UnrealTargetPlatform.XboxOne) { Definitions.Add("WITH_DIRECTXMATH=1"); } else if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { // To enable this requires Win8 SDK Definitions.Add("WITH_DIRECTXMATH=0"); // Enable to test on Win64/32. //PublicDependencyModuleNames.AddRange( // Enable to test on Win64/32. // new string[] { // "DirectXMath" //}); } else { Definitions.Add("WITH_DIRECTXMATH=0"); } }
private bool LoadV8(TargetInfo Target) { if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Windows"); if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015) { LibrariesPath = Path.Combine(LibrariesPath, "MSVC2015"); } else { LibrariesPath = Path.Combine(LibrariesPath, "MSVC2013"); } if (Target.Platform == UnrealTargetPlatform.Win64) { LibrariesPath = Path.Combine(LibrariesPath, "x64"); } else { LibrariesPath = Path.Combine(LibrariesPath, "x86"); } if (Target.Configuration == UnrealTargetConfiguration.Debug) { LibrariesPath = Path.Combine(LibrariesPath, "Debug"); } else { LibrariesPath = Path.Combine(LibrariesPath, "Release"); } PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_base_0.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_base_1.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_base_2.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_base_3.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_libbase.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_libplatform.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_nosnapshot.lib")); PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "v8", "Includes")); Definitions.Add(string.Format("WITH_V8=1")); return(true); } else if (Target.Platform == UnrealTargetPlatform.Android) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Android"); PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "ARMv7")); PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "ARM64")); PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "x86")); PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "x64")); PublicAdditionalLibraries.Add("v8_base"); PublicAdditionalLibraries.Add("v8_libbase"); PublicAdditionalLibraries.Add("v8_libplatform"); PublicAdditionalLibraries.Add("v8_nosnapshot"); Definitions.Add(string.Format("WITH_V8=1")); return(true); } Definitions.Add(string.Format("WITH_V8=0")); return(false); }
public LuaMachine(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "Slate", "SlateCore", "UMG", "InputCore" // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); if (Target.bBuildEditor) { PrivateDependencyModuleNames.AddRange(new string[] { "UnrealEd", "Projects" }); } string ThirdPartyDirectory = System.IO.Path.Combine(ModuleDirectory, "..", "ThirdParty"); if (Target.Platform == UnrealTargetPlatform.Win64) { PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "lua53_win64.lib")); } if (Target.Platform == UnrealTargetPlatform.Mac) { PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "lua53_mac.a")); } if (Target.Platform == UnrealTargetPlatform.Linux) { PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "lua53_linux64.a")); } if (Target.Platform == UnrealTargetPlatform.Android) { PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "lua53_android.a")); } if (Target.Platform == UnrealTargetPlatform.IOS) { PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "lua53_ios.a")); } }
public FLEX(TargetInfo Target) { Type = ModuleType.External; if (UEBuildConfiguration.bCompileFLEX == false) { Definitions.Add("WITH_FLEX=0"); return; } Definitions.Add("WITH_FLEX=1"); string FLEXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/FLEX-0.9.0/"; string FLEXLibDir = FLEXDir + "lib"; PublicIncludePaths.Add(FLEXDir + "include"); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(FLEXLibDir + "/x64"); if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) { PublicAdditionalLibraries.Add("flexDebug_x64.lib"); PublicDelayLoadDLLs.Add("flexDebug_x64.dll"); PublicAdditionalLibraries.Add("flexExtDebug_x64.lib"); PublicDelayLoadDLLs.Add("flexExtDebug_x64.dll"); } else { PublicAdditionalLibraries.Add("flexRelease_x64.lib"); PublicDelayLoadDLLs.Add("flexRelease_x64.dll"); PublicAdditionalLibraries.Add("flexExtRelease_x64.lib"); PublicDelayLoadDLLs.Add("flexExtRelease_x64.dll"); } PublicLibraryPaths.Add(FLEXDir + "/Win64"); string[] RuntimeDependenciesX64 = { "cudart64_70.dll", "flexDebug_x64.dll", "flexExtDebug_x64.dll", "flexExtRelease_x64.dll", "flexRelease_x64.dll", }; string FlexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/FLEX-0.9.0/Win64/"); foreach (string RuntimeDependency in RuntimeDependenciesX64) { RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency)); } } else if (Target.Platform == UnrealTargetPlatform.Win32) { PublicLibraryPaths.Add(FLEXLibDir + "/win32"); if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) { PublicAdditionalLibraries.Add("flexDebug_x86.lib"); PublicDelayLoadDLLs.Add("flexDebug_x86.dll"); PublicAdditionalLibraries.Add("flexExtDebug_x86.lib"); PublicDelayLoadDLLs.Add("flexExtDebug_x86.dll"); } else { PublicAdditionalLibraries.Add("flexRelease_x86.lib"); PublicDelayLoadDLLs.Add("flexRelease_x86.dll"); PublicAdditionalLibraries.Add("flexExtRelease_x86.lib"); PublicDelayLoadDLLs.Add("flexExtRelease_x86.dll"); } PublicLibraryPaths.Add(FLEXDir + "/Win32"); string[] RuntimeDependenciesX86 = { "cudart32_70.dll", "flexDebug_x86.dll", "flexExtDebug_x86.dll", "flexExtRelease_x86.dll", "flexRelease_x86.dll", }; string FlexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/FLEX-0.9.0/Win32/"); foreach (string RuntimeDependency in RuntimeDependenciesX86) { RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency)); } } }
public Python(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; var EngineDir = Path.GetFullPath(Target.RelativeEnginePath); PythonSDKPaths PythonSDK = null; if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux) { // Check for an explicit version before using the auto-detection logic var PythonRoot = System.Environment.GetEnvironmentVariable("UE_PYTHON_DIR"); if (PythonRoot != null) { PythonSDK = DiscoverPythonSDK(PythonRoot); } } // Perform auto-detection to try and find the Python SDK if (PythonSDK == null) { var PythonBinaryTPSDir = Path.Combine(EngineDir, "Binaries", "ThirdParty", "Python"); var PythonSourceTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python"); var PotentialSDKs = new List <PythonSDKPaths>(); // todo: This isn't correct for cross-compilation, we need to consider the host platform too if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { var PlatformDir = Target.Platform == UnrealTargetPlatform.Win32 ? "Win32" : "Win64"; PotentialSDKs.AddRange( new PythonSDKPaths[] { new PythonSDKPaths(Path.Combine(PythonBinaryTPSDir, PlatformDir), new List <string>() { Path.Combine(PythonSourceTPSDir, PlatformDir, "include") }, Path.Combine(PythonSourceTPSDir, PlatformDir, "libs"), "python27.lib"), //DiscoverPythonSDK("C:/Program Files/Python36"), DiscoverPythonSDK("C:/Python27"), } ); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PotentialSDKs.AddRange( new PythonSDKPaths[] { new PythonSDKPaths(Path.Combine(PythonBinaryTPSDir, "Mac"), new List <string>() { Path.Combine(PythonSourceTPSDir, "Mac", "include") }, Path.Combine(PythonBinaryTPSDir, "Mac"), "libpython2.7.dylib") } ); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { if (Target.Architecture.StartsWith("x86_64")) { var PlatformDir = Target.Platform.ToString(); PotentialSDKs.AddRange( new PythonSDKPaths[] { new PythonSDKPaths( Path.Combine(PythonBinaryTPSDir, PlatformDir), new List <string>() { Path.Combine(PythonSourceTPSDir, PlatformDir, "include", "python2.7"), Path.Combine(PythonSourceTPSDir, PlatformDir, "include", Target.Architecture) }, Path.Combine(PythonSourceTPSDir, PlatformDir, "lib"), "libpython2.7.a"), }); PublicAdditionalLibraries.Add("util"); // part of libc } } foreach (var PotentialSDK in PotentialSDKs) { if (PotentialSDK.IsValid()) { PythonSDK = PotentialSDK; break; } } } // Make sure the Python SDK is the correct architecture if (PythonSDK != null) { string ExpectedPointerSizeResult = Target.Platform == UnrealTargetPlatform.Win32 ? "4" : "8"; // Invoke Python to query the pointer size of the interpreter so we can work out whether it's 32-bit or 64-bit // todo: We probably need to do this for all platforms, but right now it's only an issue on Windows if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { string Result = InvokePython(PythonSDK.PythonRoot, "-c \"import struct; print(struct.calcsize('P'))\""); Result = Result != null?Result.Replace("\r", "").Replace("\n", "") : null; if (Result == null || Result != ExpectedPointerSizeResult) { PythonSDK = null; } } } if (PythonSDK == null) { PublicDefinitions.Add("WITH_PYTHON=0"); Console.WriteLine("Python SDK not found"); } else { // If the Python install we're using is within the Engine directory, make the path relative so that it's portable string EngineRelativePythonRoot = PythonSDK.PythonRoot; if (EngineRelativePythonRoot.StartsWith(EngineDir)) { // Strip the Engine directory and then combine the path with the placeholder to ensure the path is delimited correctly EngineRelativePythonRoot = EngineRelativePythonRoot.Remove(0, EngineDir.Length); foreach (string FileName in Directory.EnumerateFiles(PythonSDK.PythonRoot, "*", SearchOption.AllDirectories)) { if (!FileName.EndsWith(".pyc", System.StringComparison.OrdinalIgnoreCase)) { RuntimeDependencies.Add(FileName); } } EngineRelativePythonRoot = Path.Combine("{ENGINE_DIR}", EngineRelativePythonRoot); // Can't use $(EngineDir) as the placeholder here as UBT is eating it } PublicDefinitions.Add("WITH_PYTHON=1"); PublicDefinitions.Add(string.Format("UE_PYTHON_DIR=\"{0}\"", EngineRelativePythonRoot.Replace('\\', '/'))); // Some versions of Python need this define set when building on MSVC if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { PublicDefinitions.Add("HAVE_ROUND=1"); } PublicSystemIncludePaths.AddRange(PythonSDK.PythonIncludePath); if (Target.Platform == UnrealTargetPlatform.Mac) { // Mac doesn't understand PublicLibraryPaths PublicAdditionalLibraries.Add(Path.Combine(PythonSDK.PythonLibPath, PythonSDK.PythonLibName)); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicAdditionalLibraries.Add(Path.Combine(PythonSDK.PythonLibPath, PythonSDK.PythonLibName)); RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Python/Linux/lib/libpython2.7.so.1.0"); } else { PublicLibraryPaths.Add(PythonSDK.PythonLibPath); PublicAdditionalLibraries.Add(PythonSDK.PythonLibName); } } }
public MidiInterface(TargetInfo Target) #endif { bEnableUndefinedIdentifierWarnings = false; PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { } ); PrivateIncludePaths.AddRange( new string[] { "MidiInterface/Classes", } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "Slate", "SlateCore", "Midi" } ); // Windows if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { PublicDefinitions.Add("__STDC_WANT_SECURE_LIB__=1"); // ignore warning PublicDefinitions.Add("__WINDOWS_MM__=1"); PublicAdditionalLibraries.Add("winmm.lib"); } // MAC / IOS else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS) { PublicDefinitions.Add("__MACOSX_CORE__=1"); PublicFrameworks.AddRange( new string[] { "CoreMIDI", "CoreFoundation", } ); } // LINUX else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicDefinitions.Add("__LINUX_ALSA__=1"); PublicIncludePaths.Add("Runtime/Core/Public/Linux"); PublicAdditionalLibraries.AddRange( new string[] { "libasound2.so", "libpthread.so" }); } }
public ApplicationCore(ReadOnlyTargetRules Target) : base(Target) { PublicDependencyModuleNames.AddRange( new string[] { "Core" } ); PublicIncludePathModuleNames.AddRange( new string[] { "RHI" } ); PrivateIncludePathModuleNames.AddRange( new string[] { "InputDevice", "Analytics", "SynthBenchmark" } ); if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { AddEngineThirdPartyPrivateStaticDependencies(Target, "XInput" ); } else if (Target.Platform == UnrealTargetPlatform.Mac) { AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenGL" ); if (Target.bBuildEditor == true) { PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport"); } } else if ((Target.Platform == UnrealTargetPlatform.Linux)) { AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2" ); // We need FreeType2 and GL for the Splash, but only in the Editor if (Target.Type == TargetType.Editor) { AddEngineThirdPartyPrivateStaticDependencies(Target, "FreeType2"); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenGL"); PrivateIncludePathModuleNames.Add("ImageWrapper"); } } else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") { AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2"); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenAL"); } else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32") { AddEngineThirdPartyPrivateStaticDependencies(Target, "SDL2"); PrivateDependencyModuleNames.Add("HTML5JS"); PrivateDependencyModuleNames.Add("MapPakDownloader"); } else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS) { PublicIncludePaths.AddRange(new string[] { "Runtime/ApplicationCore/Public/Apple", "Runtime/ApplicationCore/Public/IOS" }); } }
public UnrealUSDWrapper(ReadOnlyTargetRules Target) : base(Target) { bEnableExceptions = false; bUseRTTI = true; PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Python" }); var EngineDir = Path.GetFullPath(Target.RelativeEnginePath); var PythonSourceTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python"); if (Target.WindowsPlatform.Compiler != WindowsCompiler.Clang && Target.WindowsPlatform.StaticAnalyzer == WindowsStaticAnalyzer.None && Target.CppStandard < CppStandardVersion.Cpp17 && // Not currently compatible with C++17 due to old version of Boost Target.LinkType != TargetLinkType.Monolithic && // If you want to use USD in a monolithic target, you'll have to use the ANSI allocator and remove this condition (Target.Platform != UnrealTargetPlatform.Linux || Target.bForceEnableRTTI)) // USD on Linux needs RTTI enabled for the whole editor { PublicDefinitions.Add("USE_USD_SDK=1"); PublicIncludePaths.AddRange( new string[] { ModuleDirectory + "/../ThirdParty/USD/include", }); var USDLibsDir = ""; // Always use the official version of IntelTBB string IntelTBBLibs = Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-2019u8/lib/"; if (Target.Platform == UnrealTargetPlatform.Win64) { PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=1"); USDLibsDir = Path.Combine(ModuleDirectory, "../ThirdParty/USD/lib/"); var USDLibs = new string[] { "ar", "arch", "gf", "js", "kind", "pcp", "plug", "sdf", "tf", "usd", "usdGeom", "usdLux", "usdShade", "usdSkel", "usdUtils", "vt", "work", }; foreach (string UsdLib in USDLibs) { PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib + ".lib")); } PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Win64/vc14/tbb.lib")); PublicIncludePaths.Add(PythonSourceTPSDir + "/Win64/include"); PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python/" + Target.Platform.ToString() + "/libs")); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0"); // USD uses tbb malloc on Linux USDLibsDir = Path.Combine(ModuleDirectory, "../../Binaries/Linux/", Target.Architecture); var USDLibs = new string[] { "libar.so", "libarch.so", "libboost_python.so", "libgf.so", "libjs.so", "libkind.so", "libndr.so", "libpcp.so", "libplug.so", "libsdf.so", "libsdr.so", "libtf.so", "libtrace.so", "libusd.so", "libusdGeom.so", "libusdLux.so", "libusdShade.so", "libusdSkel.so", "libusdUtils.so", "libusdVol.so", "libvt.so", "libwork.so", }; PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Linux/libtbb.so")); RuntimeDependencies.Add("$(EngineDir)/Binaries/Linux/libtbb.so.2", Path.Combine(IntelTBBLibs, "Linux/libtbb.so.2")); PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Linux/libtbbmalloc.so")); foreach (string UsdLib in USDLibs) { PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib)); } PublicIncludePaths.Add(PythonSourceTPSDir + "/Linux/include/" + Target.Architecture); PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python/" + Target.Platform.ToString() + "/lib")); } if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Linux) { PublicSystemLibraryPaths.Add(USDLibsDir); } else { System.Console.WriteLine("UnrealUSDWrapper does not support this platform"); } } else { PublicDefinitions.Add("USE_USD_SDK=0"); PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0"); // USD uses tbb malloc on Linux } }
public Blast(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; // Determine which kind of libraries to link against BlastLibraryMode LibraryMode = GetBlastLibraryMode(Target.Configuration); string LibConfiguration = GetBlastLibraryConfiguration(LibraryMode); string BlastDir = ModuleDirectory; PublicIncludePaths.AddRange( new string[] { BlastDir + "/common", BlastDir + "/lowlevel/include", BlastDir + "/globals/include", BlastDir + "/extensions/physx/include", BlastDir + "/extensions/authoring/include", } ); PublicDependencyModuleNames.AddRange( new string[] { "PhysX", }); List <string> BlastLibraries = new List <string>(); BlastLibraries.AddRange( new string[] { "NvBlast", "NvBlastGlobals", "NvBlastExtAuthoring" }); string LibSuffix = null; string DllSuffix = null; string BlastLibDirFullPath = null; // Libraries for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { LibSuffix = "_x64.lib"; DllSuffix = "_x64.dll"; BlastLibDirFullPath = BlastDir + "/Lib/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); } // TODO: Other configurations? if (LibSuffix != null) { foreach (string Lib in BlastLibraries) { string LibName = String.Format("{0}{1}{2}", Lib, LibConfiguration, LibSuffix); PublicAdditionalLibraries.Add(Path.Combine(BlastLibDirFullPath, LibName)); string BlastDllDirFullPath = PluginDirectory + "/Binaries/Win64/"; string DllName = String.Format("{0}{1}{2}", Lib, LibConfiguration, DllSuffix); RuntimeDependencies.Add(Path.Combine(BlastDllDirFullPath, DllName)); } } }
public ROSIntegration(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; string BSONPath = Path.Combine(ThirdPartyPath, "bson"); // Console.WriteLine(""); Console.WriteLine("BSONPath: " + BSONPath); // Include std::string functions for rapidjson #if UE_4_19_OR_LATER // works at least for 4.18.3, but not for 4.17.3 and below PublicDefinitions.Add("RAPIDJSON_HAS_STDSTRING=1"); #else Definitions.Add("RAPIDJSON_HAS_STDSTRING=1"); #endif PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "ROSIntegration/Private", "ROSIntegration/Private/rosbridge2cpp" // ... 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", "Slate", "SlateCore", "Sockets", "Networking" // ... 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.Win64) { Console.WriteLine("Using Windows BSON files"); PublicAdditionalLibraries.Add(Path.Combine(BSONPath, "lib", "bson-static-1.0.lib")); PublicIncludePaths.Add(Path.Combine(BSONPath, "include", "windows")); } else if (Target.Platform == UnrealTargetPlatform.Linux) { Console.WriteLine("Using Linux BSON files"); PublicAdditionalLibraries.Add(Path.Combine(BSONPath, "lib", "libbson-1.0.a")); PublicIncludePaths.Add(Path.Combine(BSONPath, "include", "linux")); } }
private bool LoadV8(ReadOnlyTargetRules Target) { int[] v8_version = GetV8Version(); bool ShouldLink_libsampler = !(v8_version[0] == 5 && v8_version[1] < 3); if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib"); if (Target.Platform == UnrealTargetPlatform.Win64) { LibrariesPath = Path.Combine(LibrariesPath, "Win64"); } else { LibrariesPath = Path.Combine(LibrariesPath, "Win32"); } if (Target.Configuration == UnrealTargetConfiguration.Debug) { LibrariesPath = Path.Combine(LibrariesPath, "Debug"); } else { LibrariesPath = Path.Combine(LibrariesPath, "Release"); } PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_init.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_initializers.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_base_0.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_base_1.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_libbase.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_libplatform.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_nosnapshot.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "v8_libsampler.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "torque_base.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "torque_generated_initializers.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "inspector.lib")); PublicDefinitions.Add(string.Format("WITH_V8=1")); return(true); } else if (Target.Platform == UnrealTargetPlatform.Android) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Android"); PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "ARM64")); PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "ARMv7")); PublicAdditionalLibraries.Add("v8_init"); PublicAdditionalLibraries.Add("v8_initializers"); PublicAdditionalLibraries.Add("v8_base"); PublicAdditionalLibraries.Add("v8_libbase"); PublicAdditionalLibraries.Add("v8_libplatform"); PublicAdditionalLibraries.Add("v8_nosnapshot"); PublicAdditionalLibraries.Add("v8_libsampler"); PublicAdditionalLibraries.Add("torque_generated_initializers"); PublicAdditionalLibraries.Add("inspector"); PublicDefinitions.Add(string.Format("WITH_V8=1")); return(true); } else if (Target.Platform == UnrealTargetPlatform.Linux) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Linux"); if (Target.Configuration == UnrealTargetConfiguration.Debug) { LibrariesPath = Path.Combine(LibrariesPath, "Debug"); } else { LibrariesPath = Path.Combine(LibrariesPath, "Release"); } PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a")); PublicDefinitions.Add(string.Format("WITH_V8=1")); return(true); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Mac"); if (Target.Configuration == UnrealTargetConfiguration.Debug) { LibrariesPath = Path.Combine(LibrariesPath, "Debug"); } else { LibrariesPath = Path.Combine(LibrariesPath, "Release"); } PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_base.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a")); PublicDefinitions.Add(string.Format("WITH_V8=1")); return(true); } else if (Target.Platform == UnrealTargetPlatform.IOS) { string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "IOS"); if (Target.Configuration == UnrealTargetConfiguration.Debug) { LibrariesPath = Path.Combine(LibrariesPath, "Debug"); } else { LibrariesPath = Path.Combine(LibrariesPath, "Release"); } PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a")); PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a")); PublicDefinitions.Add(string.Format("WITH_V8=1")); return(true); } PublicDefinitions.Add(string.Format("WITH_V8=0")); return(false); }
public WeiXinSDK(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "Projects", "ApplicationCore" // ... 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 ... } ); if (Target.Platform == UnrealTargetPlatform.Android) { PrivateDependencyModuleNames.AddRange(new string[] { "Launch" }); } if (Target.Platform == UnrealTargetPlatform.IOS) { var LibDir = Path.Combine(ModuleDirectory, "..", "..", "lib", "IOS"); PrivateIncludePaths.Add(LibDir); PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "..", "ThirdParty", "IOS")); PublicAdditionalLibraries.Add(Path.Combine(LibDir, "libWeChatSDK.a")); PublicFrameworks.AddRange( new string[] { "SystemConfiguration", "CoreTelephony", "CFNetwork" } ); // libz.tdb PublicAdditionalLibraries.Add("z"); // libsqlite3.0.tdb PublicAdditionalLibraries.Add("sqlite3.0"); // libc++.tdb PublicAdditionalLibraries.Add("c++"); } else if (Target.Platform == UnrealTargetPlatform.Android) { string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath); AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "WeiXinSDK_APL.xml")); } }
public GVoice(TargetInfo Target) #endif { string GVoiceLibPath = string.Empty; PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { "GVoice/Public", "GVoice/Public/Include", // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "GVoice/Private", // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "Projects" // ... 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 ... } ); string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, "..\\"); string GVoiceGVoiceLibDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "../GVoiceLib/")); System.Console.WriteLine("-------------- PluginPath = " + PluginPath); if (Target.Platform == UnrealTargetPlatform.Android) { PrivateDependencyModuleNames.AddRange(new string[] { "Launch" }); string aplPath = Path.Combine(PluginPath, "GVoice_APL.xml"); System.Console.WriteLine("-------------- AplPath = " + aplPath); AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", aplPath)); } else if (Target.Platform == UnrealTargetPlatform.IOS) { PrivateIncludePaths.Add("GVoice/Private/IOS"); PublicIncludePaths.AddRange(new string[] { "Runtime/ApplicationCore/Public/Apple", "Runtime/ApplicationCore/Public/IOS" }); PrivateDependencyModuleNames.AddRange( new string[] { "ApplicationCore" // ... add private dependencies that you statically link with here ... } ); /* * BuildVersion Version; * if(BuildVersion.TryRead(out Version)) * { * System.Console.WriteLine("-------------- version = " + Version.MajorVersion +"."+Version.MinorVersion); * if(Version.MajorVersion > 4 || (Version.MajorVersion == 4 && Version.MinorVersion >= 18)) * { * PrivateDependencyModuleNames.AddRange( * new string[]{"ApplicationCore" * // ... add private dependencies that you statically link with here ... * } * ); * } * } */ } else if (Target.Platform == UnrealTargetPlatform.Mac) { Definitions.Add("__GVOICE_MAC__"); } if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { PrivateIncludePaths.Add("GVoice/Private/"); string OSVersion = (Target.Platform == UnrealTargetPlatform.Win32) ? "x86" : "x64"; string libDir = OSVersion; GVoiceLibPath = Path.Combine(GVoiceGVoiceLibDir, libDir); PublicLibraryPaths.Add(GVoiceLibPath); Console.WriteLine("GVoiceLibPath:" + GVoiceLibPath); if (Target.Configuration == UnrealTargetConfiguration.Debug && false) { PublicAdditionalLibraries.Add("GCloudVoice.lib"); } else { PublicAdditionalLibraries.Add("GCloudVoice.lib"); } string binariesDir = Path.Combine(ModuleDirectory, "../../Binaries", Target.Platform.ToString()); //string filename = Path.GetFileName(Filepath); string dllPath = Path.Combine(GVoiceLibPath, "GCloudVoice.dll"); System.Console.WriteLine("src dll=" + dllPath + " dst dir=" + binariesDir); if (!Directory.Exists(binariesDir)) { Directory.CreateDirectory(binariesDir); } try { File.Copy(dllPath, Path.Combine(binariesDir, "GCloudVoice.dll"), true); } catch (Exception e) { System.Console.WriteLine("copy dll exception,maybe have exists,err=", e.ToString()); } } else if (Target.Platform == UnrealTargetPlatform.Android) { string ArchDir = "armeabi-v7a"; //BASE string libDir = ("Android/libs"); GVoiceLibPath = Path.Combine(Path.Combine(GVoiceGVoiceLibDir, libDir), ArchDir); System.Console.WriteLine("--------------Android GCloudLibPath = " + GVoiceLibPath); PublicLibraryPaths.Add(GVoiceLibPath); AddGVoiceLib(Target, "GCloudVoice"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { GVoiceLibPath = GVoiceGVoiceLibDir;// string strLib = GVoiceLibPath + "/Mac/libGCloudVoice.a"; PublicAdditionalLibraries.Add(strLib); } else if (Target.Platform == UnrealTargetPlatform.IOS) { GVoiceLibPath = GVoiceGVoiceLibDir;// Path.Combine(GVoiceLibPath, "iOS/"); string strLib = GVoiceLibPath + "/iOS/libGCloudVoice.a"; PublicAdditionalLibraries.Add(strLib); string strBundle = GVoiceLibPath + "/iOS/GCloudVoice.bundle"; AdditionalBundleResources.Add(new UEBuildBundleResource("../GVoiceLib/iOS/GCloudVoice.bundle", bInShouldLog: false)); System.Console.WriteLine("---framework path:" + Path.Combine(GVoiceLibPath, "VoiceFrameWork.embeddedframework.zip")); //PublicAdditionalFrameworks.Add(new UEBuildFramework("VoiceFWForBundle", "../GVoiceLib/iOS/VoiceFWForBundle.embeddedframework.zip", "iOS/GCloudVoice.bundle")); PublicAdditionalLibraries.AddRange( new string[] { "stdc++.6.0.9", //"libstdc++.6.0.9.tbd","libz.tbd","libc++.tbd","libz.1.1.3.tbd","libsqlite3.tbd","libxml2.tbd", //Path.Combine(GVoiceGVoiceLibDir, "libAPMidasInterface.a") }); // These are iOS system libraries that Facebook depends on (FBAudienceNetwork, FBNotifications) PublicFrameworks.AddRange( new string[] { "AVFoundation", "CoreTelephony", "Security", "SystemConfiguration", "AudioToolbox", "CoreAudio", "Foundation", }); //AddGVoiceLib(Target, "libGCloudVoice.a"); /* * PublicAdditionalFrameworks.Add(new UEBuildFramework("ABase", Path.Combine(GCloudGVoiceLibDir, "iOS/ABase.embeddedframework.zip"))); */ } }
public ApexDestructionLib(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; if (Target.bCompileAPEX == false) { return; } // Determine which kind of libraries to link against APEXLibraryMode LibraryMode = GetAPEXLibraryMode(Target.Configuration); string LibrarySuffix = GetAPEXLibrarySuffix(LibraryMode); string ApexVersion = "APEX_1.4"; string APEXDir = Target.UEThirdPartySourceDirectory + "PhysX3/" + ApexVersion + "/"; string APEXLibDir = Target.UEThirdPartySourceDirectory + "PhysX3/Lib"; PublicSystemIncludePaths.AddRange( new string[] { APEXDir + "include/destructible", } ); // List of default library names (unused unless LibraryFormatString is non-null) List <string> ApexLibraries = new List <string>(); ApexLibraries.AddRange( new string[] { "APEX_Destructible{0}", }); string LibraryFormatString = null; // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { APEXLibDir += "/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(APEXLibDir); PublicAdditionalLibraries.Add(String.Format("APEXFramework{0}_x64.lib", LibrarySuffix)); PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_x64.dll", LibrarySuffix)); string[] RuntimeDependenciesX64 = { "APEX_Destructible{0}_x64.dll", }; string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win64/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string RuntimeDependency in RuntimeDependenciesX64) { string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } } else if (Target.Platform == UnrealTargetPlatform.Win32) { APEXLibDir += "/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(APEXLibDir); PublicAdditionalLibraries.Add(String.Format("APEXFramework{0}_x86.lib", LibrarySuffix)); PublicDelayLoadDLLs.Add(String.Format("APEXFramework{0}_x86.dll", LibrarySuffix)); string[] RuntimeDependenciesX86 = { "APEX_Destructible{0}_x86.dll", }; string ApexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win32/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string RuntimeDependency in RuntimeDependenciesX86) { string FileName = ApexBinariesDir + String.Format(RuntimeDependency, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { APEXLibDir += "/Mac"; string[] DynamicLibrariesMac = new string[] { "/libAPEX_Destructible{0}.dylib" }; string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Mac"; foreach (string Lib in DynamicLibrariesMac) { string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix); PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(LibraryPath); } } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { if (Target.Architecture.StartsWith("x86_64")) { string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Linux/" + Target.Architecture; string LibraryPath = PhysXBinariesDir + String.Format("/libAPEX_Destructible{0}.so", LibrarySuffix); PublicAdditionalLibraries.Add(LibraryPath); RuntimeDependencies.Add(LibraryPath); } } else if (Target.Platform == UnrealTargetPlatform.PS4) { APEXLibDir += "/PS4"; PublicLibraryPaths.Add(APEXLibDir); LibraryFormatString = "{0}"; } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { APEXLibDir += "/XboxOne/VS2015"; PublicLibraryPaths.Add(APEXLibDir); LibraryFormatString = "{0}.lib"; } else if (Target.Platform == UnrealTargetPlatform.Switch) { APEXLibDir += "/Switch"; PublicLibraryPaths.Add(APEXLibDir); LibraryFormatString = "{0}"; } // Add the libraries needed (used for all platforms except Windows and Mac) if (LibraryFormatString != null) { foreach (string Lib in ApexLibraries) { string ConfiguredLib = String.Format(Lib, LibrarySuffix); string FinalLib = String.Format(LibraryFormatString, ConfiguredLib); PublicAdditionalLibraries.Add(FinalLib); } } }
public Noesis(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string NoesisBasePath = ModuleDirectory + "/NoesisSDK/"; string NoesisIncludePath = NoesisBasePath + "Include/"; PublicIncludePaths.Add(NoesisIncludePath); // Let's try to make sure the right version of the SDK is in the right place. const string RequiredRevision = "(r6972)"; const string RequiredVersionName = "2.1.0f1"; if (!Directory.Exists(NoesisBasePath)) { throw new BuildException("Could not find NoesisGUI SDK in " + NoesisBasePath + ". Minimum required version is " + RequiredVersionName); } if (!Directory.Exists(NoesisBasePath + "Bin")) { throw new BuildException("Could not find NoesisGUI SDK Bin directory in " + NoesisBasePath + "Bin. Minimum required version is " + RequiredVersionName); } if (!Directory.Exists(NoesisBasePath + "Include")) { throw new BuildException("Could not find NoesisGUI SDK Include directory in " + NoesisBasePath + "Include. Minimum required version is " + RequiredVersionName); } if (!Directory.Exists(NoesisBasePath + "Lib")) { throw new BuildException("Could not find NoesisGUI SDK Lib directory in " + NoesisBasePath + "Lib. Minimum required version is " + RequiredVersionName); } string NoesisSdkVersionInfo; try { NoesisSdkVersionInfo = File.ReadAllText(NoesisBasePath + "version.txt"); } catch (Exception) { throw new BuildException("Could not find NoesisGUI SDK version.txt in " + NoesisBasePath + "version.txt. Minimum required version is " + RequiredVersionName); } string[] SplitVersion = NoesisSdkVersionInfo.Split(' '); if (String.Compare(SplitVersion[SplitVersion.Length - 1], RequiredRevision) < 0) { throw new BuildException("Wrong version of the NoesisGUI SDK installed in " + NoesisBasePath + ". Minimum required version is " + RequiredVersionName); } PublicSystemIncludePaths.Add(NoesisIncludePath); if (Target.Platform == UnrealTargetPlatform.Win64) { string NoesisLibPath = NoesisBasePath + "Lib/windows_x86_64/"; PublicLibraryPaths.Add(NoesisLibPath); PublicAdditionalLibraries.Add("Noesis.lib"); string BaseTargetPath; if (Target.LinkType == TargetLinkType.Monolithic) { BaseTargetPath = DirectoryReference.FromFile(Target.ProjectFile).ToString(); } else { BaseTargetPath = Target.RelativeEnginePath; } string NoesisDllPath = "/NoesisSDK/Bin/windows_x86_64/Noesis.dll"; string NoesisDllTargetPath = "/Binaries/Win64/Noesis.dll"; try { if (!System.IO.Directory.Exists(BaseTargetPath + "/Binaries/Win64")) { System.IO.Directory.CreateDirectory(BaseTargetPath + "/Binaries/Win64"); } System.IO.File.Copy(ModuleDirectory + NoesisDllPath, BaseTargetPath + NoesisDllTargetPath, true); } catch (IOException Exception) { if (Exception.HResult != -2147024864) // 0x80070020: The process cannot access the file ... because it is being used by another process. { throw; } } if (Target.LinkType == TargetLinkType.Monolithic) { RuntimeDependencies.Add("$(ProjectDir)" + NoesisDllTargetPath); } else { RuntimeDependencies.Add("$(EngineDir)" + NoesisDllTargetPath); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { string NoesisLibPath = NoesisBasePath + "Bin/osx/"; PublicLibraryPaths.Add(NoesisLibPath); PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.dylib"); string NoesisDylibPath = "/NoesisSDK/Bin/osx/Noesis.dylib"; RuntimeDependencies.Add(ModuleDirectory + NoesisDylibPath); } else if (Target.Platform == UnrealTargetPlatform.IOS) { string NoesisLibPath = NoesisBasePath + "Lib/ios/"; PublicLibraryPaths.Add(NoesisLibPath); PublicAdditionalLibraries.Add("Noesis"); PublicAdditionalShadowFiles.Add(Path.Combine(NoesisLibPath, "libNoesis.a")); } else if (Target.Platform == UnrealTargetPlatform.Android) { string NoesisLibPath = NoesisBasePath + "Bin/android_arm/"; PublicLibraryPaths.Add(NoesisLibPath); PublicAdditionalLibraries.Add("Noesis"); string NoesisAplPath = "/Noesis_APL.xml"; AdditionalPropertiesForReceipt.Add("AndroidPlugin", ModuleDirectory + NoesisAplPath); } else if (Target.Platform == UnrealTargetPlatform.PS4) { string NoesisLibPath = NoesisBasePath + "Lib/ps4/"; PublicAdditionalLibraries.Add(NoesisLibPath + "Noesis.a"); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { string NoesisLibPath = NoesisBasePath + "Bin/xbox_one/"; PublicLibraryPaths.Add(NoesisLibPath); PublicAdditionalLibraries.Add("Noesis.lib"); } }