static string GetPhysXLibrarySuffix(PhysXLibraryMode Mode) { switch (Mode) { case PhysXLibraryMode.Debug: { if( BuildConfiguration.bDebugBuildsActuallyUseDebugCRT ) { return "DEBUG"; } else { return "PROFILE"; } } case PhysXLibraryMode.Checked: return "CHECKED"; case PhysXLibraryMode.Profile: return "PROFILE"; default: case PhysXLibraryMode.Shipping: { if( bShippingBuildsActuallyUseShippingPhysXLibraries ) { return ""; } else { return "PROFILE"; } } } }
static string GetPhysXLibrarySuffix(PhysXLibraryMode Mode) { switch (Mode) { case PhysXLibraryMode.Debug: return "DEBUG"; case PhysXLibraryMode.Checked: return "CHECKED"; case PhysXLibraryMode.Profile: return "PROFILE"; case PhysXLibraryMode.Shipping: default: return ""; } }
static string GetPhysXLibrarySuffix(PhysXLibraryMode Mode) { switch (Mode) { case PhysXLibraryMode.Debug: return("DEBUG"); case PhysXLibraryMode.Checked: return("CHECKED"); case PhysXLibraryMode.Profile: return("PROFILE"); case PhysXLibraryMode.Shipping: default: return(""); } }
static string GetPhysXLibrarySuffix(PhysXLibraryMode Mode) { switch (Mode) { case PhysXLibraryMode.Debug: { if (BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) { return("DEBUG"); } else { return("PROFILE"); } } case PhysXLibraryMode.Checked: return("CHECKED"); case PhysXLibraryMode.Profile: return("PROFILE"); default: case PhysXLibraryMode.Shipping: { if (bShippingBuildsActuallyUseShippingPhysXLibraries) { return(""); } else { return("PROFILE"); } } } }
public PhysXVehicleLib(TargetInfo Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); string PhysXLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/"; // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(PhysXLibDir + "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName()); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}_x64.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { PublicLibraryPaths.Add(PhysXLibDir + "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName()); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}_x86.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicLibraryPaths.Add(PhysXLibDir + "Mac"); PublicAdditionalLibraries.Add(String.Format(PhysXLibDir + "Mac/libPhysX3Vehicle{0}.a", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicLibraryPaths.Add(PhysXLibDir + "Linux/" + Target.Architecture); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.IOS) { PublicLibraryPaths.Add(PhysXLibDir + "IOS"); PublicAdditionalLibraries.Add("PhysX3Vehicle" + LibrarySuffix); } else if (Target.Platform == UnrealTargetPlatform.TVOS) { PublicLibraryPaths.Add(PhysXLibDir + "TVOS"); PublicAdditionalLibraries.Add("PhysX3Vehicle" + LibrarySuffix); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PublicAdditionalLibraries.Add(PhysXLibDir + "HTML5/PhysX3Vehicle" + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicLibraryPaths.Add(PhysXLibDir + "PS4"); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS" + WindowsPlatform.GetVisualStudioCompilerVersionName())); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicLibraryPaths.Add(PhysXLibDir + "Switch"); PublicAdditionalLibraries.Add("PhysX3Vehicle" + LibrarySuffix); } }
public PhysX(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); if (LibraryMode == PhysXLibraryMode.Shipping) { PublicDefinitions.Add("WITH_PHYSX_RELEASE=1"); } else { PublicDefinitions.Add("WITH_PHYSX_RELEASE=0"); } string PhysXVersion = "PhysX_3.4"; string PxSharedVersion = "PxShared"; string PhysXDir = Target.UEThirdPartySourceDirectory + "PhysX3/" + PhysXVersion + "/"; string PxSharedDir = Target.UEThirdPartySourceDirectory + "PhysX3/" + PxSharedVersion + "/"; string PhysXLibDir = Target.UEThirdPartySourceDirectory + "PhysX3/Lib/"; string PxSharedLibDir = Target.UEThirdPartySourceDirectory + "PhysX3/Lib/"; string PhysXIncludeDir = PhysXDir + "Include/"; string PxSharedIncludeDir = PxSharedDir + "include/"; PublicSystemIncludePaths.AddRange( new string[] { PxSharedIncludeDir, PxSharedIncludeDir + "cudamanager", PxSharedIncludeDir + "filebuf", PxSharedIncludeDir + "foundation", PxSharedIncludeDir + "pvd", PxSharedIncludeDir + "task", PhysXIncludeDir, PhysXIncludeDir + "foundation", PhysXIncludeDir + "cooking", PhysXIncludeDir + "common", PhysXIncludeDir + "extensions", PhysXIncludeDir + "geometry" } ); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PhysXLibDir += "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PxSharedLibDir += "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesX64 = new string[] { "PhysX3{0}_x64.lib", "PhysX3Extensions{0}_x64.lib", "PhysX3Cooking{0}_x64.lib", "PhysX3Common{0}_x64.lib", "PsFastXml{0}_x64.lib", "PxFoundation{0}_x64.lib", "PxPvdSDK{0}_x64.lib", "PxTask{0}_x64.lib", }; string[] DelayLoadDLLsX64 = new string[] { "PxFoundation{0}_x64.dll", "PxPvdSDK{0}_x64.dll", "PhysX3{0}_x64.dll", "PhysX3Cooking{0}_x64.dll", "PhysX3Common{0}_x64.dll", }; string[] PxSharedRuntimeDependenciesX64 = new string[] { "PxFoundation{0}_x64.dll", "PxPvdSDK{0}_x64.dll", }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win64/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in DelayLoadDLLsX64) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { PublicDefinitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } string PxSharedBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win64/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in PxSharedRuntimeDependenciesX64) { RuntimeDependencies.Add(PxSharedBinariesDir + String.Format(DLL, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Win32) { PhysXLibDir += "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PxSharedLibDir += "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesX86 = new string[] { "PhysX3{0}_x86.lib", "PhysX3Extensions{0}_x86.lib", "PhysX3Cooking{0}_x86.lib", "PhysX3Common{0}_x86.lib", "PsFastXml{0}_x86.lib", "PxFoundation{0}_x86.lib", "PxPvdSDK{0}_x86.lib", "PxTask{0}_x86.lib", }; string[] DelayLoadDLLsX86 = new string[] { "PxFoundation{0}_x86.dll", "PxPvdSDK{0}_x86.dll", "PhysX3{0}_x86.dll", "PhysX3Cooking{0}_x86.dll", "PhysX3Common{0}_x86.dll" }; foreach (string Lib in StaticLibrariesX86) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX86) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX3/Win32/VS{0}/", Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in DelayLoadDLLsX86) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { PublicDefinitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { PhysXLibDir += "Mac"; PxSharedLibDir += "Mac"; PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesMac = new string[] { PhysXLibDir + "/libLowLevel{0}.a", PhysXLibDir + "/libLowLevelCloth{0}.a", PhysXLibDir + "/libPhysX3Extensions{0}.a", PhysXLibDir + "/libSceneQuery{0}.a", PhysXLibDir + "/libSimulationController{0}.a", PxSharedLibDir + "/libPxTask{0}.a", PxSharedLibDir + "/libPsFastXml{0}.a" }; foreach (string Lib in StaticLibrariesMac) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } string[] DynamicLibrariesMac = new string[] { "/libPhysX3{0}.dylib", "/libPhysX3Cooking{0}.dylib", "/libPhysX3Common{0}.dylib", "/libPxFoundation{0}.dylib", "/libPxPvdSDK{0}.dylib", }; string PhysXBinariesDir = Target.UEThirdPartyBinariesDirectory + "PhysX3/Mac"; foreach (string Lib in DynamicLibrariesMac) { string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix); PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(LibraryPath); } if (LibrarySuffix != "") { PublicDefinitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/x86"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/arm64"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/x64"); string[] StaticLibrariesAndroid = new string[] { "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", // not needed until Apex "PhysX3Common{0}", //"PhysXVisualDebuggerSDK{0}", "PxFoundation{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; //if you are shipping, and you actually want the shipping libs, you do not need this lib if (!(LibraryMode == PhysXLibraryMode.Shipping && Target.bUseShippingPhysXLibraries)) { // PublicAdditionalLibraries.Add("nvToolsExt"); } foreach (string Lib in StaticLibrariesAndroid) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Linux) { PhysXLibDir += "/Linux/" + Target.Architecture; PxSharedLibDir += "/Linux/" + Target.Architecture; PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesPhysXLinux = new string[] { "rt", "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PxFoundation{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; foreach (string Lib in StaticLibrariesPhysXLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } if (Target.bCompileAPEX) { string[] StaticLibrariesApexLinux = new string[] { "NvParameterized{0}", "RenderDebug{0}" }; foreach (string Lib in StaticLibrariesApexLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } } else if (Target.Platform == UnrealTargetPlatform.IOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "IOS/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "IOS/"); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.TVOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "TVOS/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "TVOS/"); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "HTML5/"); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3CharacterKinematic", "PhysX3Common", "PhysX3Cooking", "PhysX3Extensions", //"PhysXVisualDebuggerSDK", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; string OpimizationSuffix = ""; if (Target.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } foreach (var lib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + OpimizationSuffix + ".bc"); } } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicLibraryPaths.Add(PhysXLibDir + "PS4"); string[] StaticLibrariesPS4 = new string[] { "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; foreach (string Lib in StaticLibrariesPS4) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { PublicDefinitions.Add("PX_PHYSX_STATIC_LIB=1"); PublicDefinitions.Add("_XBOX_ONE=1"); PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS2015")); string[] StaticLibrariesXB1 = new string[] { "PhysX3{0}.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}.lib", "PhysX3Common{0}.lib", "LowLevel{0}.lib", "LowLevelAABB{0}.lib", "LowLevelCloth{0}.lib", "LowLevelDynamics{0}.lib", "LowLevelParticles{0}.lib", "SceneQuery{0}.lib", "SimulationController{0}.lib", "PxFoundation{0}.lib", "PxTask{0}.lib", "PxPvdSDK{0}.lib", "PsFastXml{0}.lib" }; foreach (string Lib in StaticLibrariesXB1) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicLibraryPaths.Add(PhysXLibDir + "Switch"); PublicLibraryPaths.Add(PxSharedLibDir + "Switch"); string[] StaticLibrariesSwitch = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", "PhysX3Cooking", "PhysX3Extensions", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string Lib in StaticLibrariesSwitch) { PublicAdditionalLibraries.Add(Lib + LibrarySuffix); } } }
public PhysXVehicleLib(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); string PhysXLibDir = Target.UEThirdPartySourceDirectory + "PhysX3/Lib/"; // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(PhysXLibDir + "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}_x64.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Win32) { PublicLibraryPaths.Add(PhysXLibDir + "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName()); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}_x86.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicLibraryPaths.Add(PhysXLibDir + "Mac"); PublicAdditionalLibraries.Add(String.Format(PhysXLibDir + "Mac/libPhysX3Vehicle{0}.a", LibrarySuffix)); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android)) { PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}", LibrarySuffix)); } else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix)) { PublicLibraryPaths.Add(PhysXLibDir + "Linux/" + Target.Architecture); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.IOS) { PublicLibraryPaths.Add(PhysXLibDir + "IOS"); PublicAdditionalLibraries.Add("PhysX3Vehicle" + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "IOS", "libPhysX3Vehicle" + LibrarySuffix + ".a")); } else if (Target.Platform == UnrealTargetPlatform.TVOS) { PublicLibraryPaths.Add(PhysXLibDir + "TVOS"); PublicAdditionalLibraries.Add("PhysX3Vehicle" + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "TVOS", "libPhysX3Vehicle" + LibrarySuffix + ".a")); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { string OpimizationSuffix = ""; if (Target.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } PublicAdditionalLibraries.Add(PhysXLibDir + "HTML5/PhysX3Vehicle" + OpimizationSuffix + ".bc"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicLibraryPaths.Add(PhysXLibDir + "PS4"); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS2015")); PublicAdditionalLibraries.Add(String.Format("PhysX3Vehicle{0}.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicLibraryPaths.Add(PhysXLibDir + "Switch"); PublicAdditionalLibraries.Add("PhysX3Vehicle" + LibrarySuffix); } }
public PhysX(TargetInfo Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); Definitions.Add("WITH_PHYSX=1"); if (UEBuildConfiguration.bCompileAPEX == false) { // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but APEX is not. Definitions.Add("WITH_APEX=0"); } if (UEBuildConfiguration.bCompilePhysXVehicle == false) { // Since PhysX Vehicle is dependent on PhysX, if Vehicle is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but Vehicle is not. Definitions.Add("WITH_VEHICLE=0"); } if (LibraryMode == PhysXLibraryMode.Shipping) { Definitions.Add("WITH_PHYSX_RELEASE=1"); } else { Definitions.Add("WITH_PHYSX_RELEASE=0"); } string PhysXVersion = "PhysX_3.4"; string PxSharedVersion = "PxShared"; string PhysXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/"; string PxSharedDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PxSharedVersion + "/"; string PhysXLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/"; string PxSharedLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/"; string PhysXIncludeDir = PhysXDir + "Include/"; string PxSharedIncludeDir = PxSharedDir + "include/"; if (Target.Platform == UnrealTargetPlatform.WolfPlat) { // all physx includes in a WolfPlat subdir PhysXIncludeDir = PhysXIncludeDir + "WolfPlat/"; PxSharedIncludeDir = PxSharedIncludeDir + "WolfPlat/"; } PublicSystemIncludePaths.AddRange( new string[] { PxSharedIncludeDir, PxSharedIncludeDir + "cudamanager", PxSharedIncludeDir + "filebuf", PxSharedIncludeDir + "foundation", PxSharedIncludeDir + "pvd", PxSharedIncludeDir + "task", PhysXIncludeDir, PhysXIncludeDir + "foundation", PhysXIncludeDir + "cooking", PhysXIncludeDir + "common", PhysXIncludeDir + "extensions", PhysXIncludeDir + "geometry", PhysXIncludeDir + "vehicle" } ); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PhysXLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PxSharedLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesX64 = new string[] { "PhysX3{0}_x64.lib", "PhysX3Extensions{0}_x64.lib", "PhysX3Cooking{0}_x64.lib", "PhysX3Common{0}_x64.lib", "PhysX3Vehicle{0}_x64.lib", "PsFastXml{0}_x64.lib", "PxFoundation{0}_x64.lib", "PxPvdSDK{0}_x64.lib", "PxTask{0}_x64.lib", }; string[] DelayLoadDLLsX64 = new string[] { "PxFoundation{0}_x64.dll", "PxPvdSDK{0}_x64.dll", "PhysX3{0}_x64.dll", "PhysX3Cooking{0}_x64.dll", "PhysX3Common{0}_x64.dll", }; string[] PxSharedRuntimeDependenciesX64 = new string[] { "PxFoundation{0}_x64.dll", "PxPvdSDK{0}_x64.dll", }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in DelayLoadDLLsX64) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } string PxSharedBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in PxSharedRuntimeDependenciesX64) { RuntimeDependencies.Add(new RuntimeDependency(PxSharedBinariesDir + String.Format(DLL, LibrarySuffix))); } } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { PhysXLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PxSharedLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesX86 = new string[] { "PhysX3{0}_x86.lib", "PhysX3Extensions{0}_x86.lib", "PhysX3Cooking{0}_x86.lib", "PhysX3Common{0}_x86.lib", "PhysX3Vehicle{0}_x86.lib", "PsFastXml{0}_x86.lib", "PxFoundation{0}_x86.lib", "PxPvdSDK{0}_x86.lib", "PxTask{0}_x86.lib", }; string[] DelayLoadDLLsX86 = new string[] { "PxFoundation{0}_x86.dll", "PxPvdSDK{0}_x86.dll", "PhysX3{0}_x86.dll", "PhysX3Cooking{0}_x86.dll", "PhysX3Common{0}_x86.dll" }; foreach (string Lib in StaticLibrariesX86) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX86) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in DelayLoadDLLsX86) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } if (LibrarySuffix != "") { Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Mac) { PhysXLibDir += "Mac"; PxSharedLibDir += "Mac"; PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesMac = new string[] { PhysXLibDir + "/libLowLevel{0}.a", PhysXLibDir + "/libLowLevelCloth{0}.a", PhysXLibDir + "/libPhysX3Extensions{0}.a", PhysXLibDir + "/libPhysX3Vehicle{0}.a", PhysXLibDir + "/libSceneQuery{0}.a", PhysXLibDir + "/libSimulationController{0}.a", PxSharedLibDir + "/libPxTask{0}.a", PxSharedLibDir + "/libPsFastXml{0}.a" }; foreach (string Lib in StaticLibrariesMac) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } string[] DynamicLibrariesMac = new string[] { "/libPhysX3{0}.dylib", "/libPhysX3Cooking{0}.dylib", "/libPhysX3Common{0}.dylib", "/libPxFoundation{0}.dylib", "/libPxPvdSDK{0}.dylib", }; string PhysXBinariesDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac"; foreach (string Lib in DynamicLibrariesMac) { string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix); PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(new RuntimeDependency(LibraryPath)); } if (LibrarySuffix != "") { Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix); } } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/x86"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/arm64"); PublicLibraryPaths.Add(PxSharedLibDir + "Android/x64"); string[] StaticLibrariesAndroid = new string[] { "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "PhysX3{0}", "PhysX3Extensions{0}", // "PhysX3Cooking{0}", // not needed until Apex "PhysX3Common{0}", "PhysX3Vehicle{0}", //"PhysXVisualDebuggerSDK{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; //if you are shipping, and you actually want the shipping libs, you do not need this lib if (!(LibraryMode == PhysXLibraryMode.Shipping && BuildConfiguration.bUseShippingPhysXLibraries)) { // PublicAdditionalLibraries.Add("nvToolsExt"); } foreach (string Lib in StaticLibrariesAndroid) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Linux) { PhysXLibDir += "/Linux/" + Target.Architecture; PxSharedLibDir += "/Linux/" + Target.Architecture; PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] StaticLibrariesLinux = new string[] { "rt", "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "NvParameterized{0}", "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PhysX3Vehicle{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}", "RenderDebug{0}" }; foreach (string Lib in StaticLibrariesLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.IOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "IOS/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "IOS/"); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "PhysX3Vehicle", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.TVOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "TVOS/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "TVOS/"); PublicLibraryPaths.Add(PhysXLibDir); PublicLibraryPaths.Add(PxSharedLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "PhysX3Vehicle", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/"); PxSharedLibDir = Path.Combine(PxSharedLibDir, "HTML5/"); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelCloth", "PhysX3", "PhysX3Common", "PhysX3Cooking", "PhysX3Extensions", //"PhysXVisualDebuggerSDK", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (var lib in PhysXLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } if (UEBuildConfiguration.bCompilePhysXVehicle) { string[] PhysXVehicleLibs = new string[] { "PhysX3Vehicle", }; foreach (var lib in PhysXVehicleLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } } } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicLibraryPaths.Add(PhysXLibDir + "PS4"); string[] StaticLibrariesPS4 = new string[] { "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PhysX3Vehicle{0}", "LowLevel{0}", "LowLevelAABB{0}", "LowLevelCloth{0}", "LowLevelDynamics{0}", "LowLevelParticles{0}", "SceneQuery{0}", "SimulationController{0}", "PxFoundation{0}", "PxTask{0}", "PxPvdSDK{0}", "PsFastXml{0}" }; foreach (string Lib in StaticLibrariesPS4) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { Definitions.Add("PX_PHYSX_STATIC_LIB=1"); Definitions.Add("_XBOX_ONE=1"); PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS" + WindowsPlatform.GetVisualStudioCompilerVersionName())); string[] StaticLibrariesXB1 = new string[] { "PhysX3{0}.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}.lib", "PhysX3Common{0}.lib", "PhysX3Vehicle{0}.lib", "LowLevel{0}.lib", "LowLevelAABB{0}.lib", "LowLevelCloth{0}.lib", "LowLevelDynamics{0}.lib", "LowLevelParticles{0}.lib", "SceneQuery{0}.lib", "SimulationController{0}.lib", "PxFoundation{0}.lib", "PxTask{0}.lib", "PxPvdSDK{0}.lib", "PsFastXml{0}.lib" }; foreach (string Lib in StaticLibrariesXB1) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.WolfPlat) { PublicLibraryPaths.Add(PhysXLibDir + "WolfPlat"); PublicLibraryPaths.Add(PxSharedLibDir + "WolfPlat"); string[] StaticLibrariesWolf = new string[] { "LowLevel", "LowLevelAABB", "LowLevelCloth", "LowLevelDynamics", "LowLevelParticles", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "PhysX3Vehicle", "SceneQuery", "SimulationController", "PxFoundation", "PxTask", "PxPvdSDK", "PsFastXml" }; foreach (string Lib in StaticLibrariesWolf) { PublicAdditionalLibraries.Add(Lib + LibrarySuffix); } } }
public PhysX(TargetInfo Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); Definitions.Add("WITH_PHYSX=1"); if (UEBuildConfiguration.bCompileAPEX == false) { // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but APEX is not. Definitions.Add("WITH_APEX=0"); } if (UEBuildConfiguration.bCompilePhysXVehicle == false) { // Since PhysX Vehicle is dependent on PhysX, if Vehicle is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but Vehicle is not. Definitions.Add("WITH_VEHICLE=0"); } string PhysXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/PhysX-3.3/"; string PhysXLibDir = PhysXDir + "lib/"; PublicSystemIncludePaths.AddRange( new string[] { PhysXDir + "include", PhysXDir + "include/foundation", PhysXDir + "include/cooking", PhysXDir + "include/common", PhysXDir + "include/extensions", PhysXDir + "include/geometry", PhysXDir + "include/vehicle" } ); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/windows"); PhysXLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesX64 = new string[] { "PhysX3{0}_x64.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}_x64.lib", "PhysX3Common{0}_x64.lib", "PhysX3Vehicle{0}.lib", "PxTask{0}.lib", "PhysXVisualDebuggerSDK{0}.lib", "PhysXProfileSDK{0}.lib" }; string[] DelayLoadDLLsX64 = new string[] { "PhysX3{0}_x64.dll", "PhysX3Cooking{0}_x64.dll", "PhysX3Common{0}_x64.dll" }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } PublicDelayLoadDLLs.Add("nvToolsExt64_1.dll"); } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { PublicIncludePaths.Add(PhysXDir + "include/foundation/windows"); PhysXLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesX86 = new string[] { "PhysX3{0}_x86.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}_x86.lib", "PhysX3Common{0}_x86.lib", "PhysX3Vehicle{0}.lib", "PxTask{0}.lib", "PhysXVisualDebuggerSDK{0}.lib", "PhysXProfileSDK{0}.lib" }; string[] DelayLoadDLLsX86 = new string[] { "PhysX3{0}_x86.dll", "PhysX3Cooking{0}_x86.dll", "PhysX3Common{0}_x86.dll" }; foreach (string Lib in StaticLibrariesX86) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX86) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } PublicDelayLoadDLLs.Add("nvToolsExt32_1.dll"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PhysXLibDir += "/osx64"; PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesMac = new string[] { PhysXLibDir + "/libLowLevel{0}.a", PhysXLibDir + "/libLowLevelCloth{0}.a", PhysXLibDir + "/libPhysX3{0}.a", PhysXLibDir + "/libPhysX3CharacterKinematic{0}.a", PhysXLibDir + "/libPhysX3Extensions{0}.a", PhysXLibDir + "/libPhysX3Cooking{0}.a", PhysXLibDir + "/libPhysX3Common{0}.a", PhysXLibDir + "/libPhysX3Vehicle{0}.a", PhysXLibDir + "/libPxTask{0}.a", PhysXLibDir + "/libPhysXVisualDebuggerSDK{0}.a", PhysXLibDir + "/libPhysXProfileSDK{0}.a", PhysXLibDir + "/libPvdRuntime{0}.a", PhysXLibDir + "/libSceneQuery{0}.a", PhysXLibDir + "/libSimulationController{0}.a" }; foreach (string Lib in StaticLibrariesMac) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/arm64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); string[] StaticLibrariesAndroid = new string[] { "LowLevel{0}", "LowLevelCloth{0}", "PhysX3{0}", "PhysX3CharacterKinematic{0}", "PhysX3Extensions{0}", // "PhysX3Cooking{0}", // not needed until Apex "PhysX3Common{0}", "PhysX3Vehicle{0}", "PxTask{0}", "PhysXVisualDebuggerSDK{0}", "PhysXProfileSDK{0}", "PvdRuntime{0}", "SceneQuery{0}", "SimulationController{0}", }; // the "shipping" don't need the nvTools library if (LibraryMode != PhysXLibraryMode.Shipping || !bShippingBuildsActuallyUseShippingPhysXLibraries) { PublicAdditionalLibraries.Add("nvToolsExt"); } foreach (string Lib in StaticLibrariesAndroid) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Linux) { PhysXLibDir += "/Linux/" + Target.Architecture; PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesLinux = new string[] { "rt", "LowLevel{0}", "LowLevelCloth{0}", "PhysX3{0}", "PhysX3CharacterKinematic{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PhysX3Vehicle{0}", "PxTask{0}", "PhysXVisualDebuggerSDK{0}", "PhysXProfileSDK{0}", "PvdRuntime{0}", "SceneQuery{0}", "SimulationController{0}", }; if (LibraryMode == PhysXLibraryMode.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) { //@TODO: Needed? PublicAdditionalLibraries.Add("m"); } foreach (string Lib in StaticLibrariesLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.IOS) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PhysXLibDir = Path.Combine(PhysXLibDir, "IOS/"); PublicLibraryPaths.Add(PhysXLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelCloth", "PhysX3", "PhysX3CharacterKinematic", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "PhysX3Vehicle", "PxTask", "PhysXVisualDebuggerSDK", "PhysXProfileSDK", "PvdRuntime", "SceneQuery", "SimulationController", }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/"); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelCloth", "PhysX3", "PhysX3CharacterKinematic", "PhysX3Common", "PhysX3Cooking", "PhysX3Extensions", "PxTask", "PhysXVisualDebuggerSDK", "PhysXProfileSDK", "PvdRuntime", "SceneQuery", "SimulationController", }; foreach (var lib in PhysXLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } if (UEBuildConfiguration.bCompilePhysXVehicle) { string[] PhysXVehicleLibs = new string[] { "PhysX3Vehicle", }; foreach (var lib in PhysXVehicleLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } } } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/PS4"); PublicLibraryPaths.Add(PhysXDir + "lib/PS4"); string[] StaticLibrariesPS4 = new string[] { "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PhysX3Vehicle{0}", "PxTask{0}", "PhysXVisualDebuggerSDK{0}", "PhysXProfileSDK{0}" }; foreach (string Lib in StaticLibrariesPS4) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { PublicSystemIncludePaths.Add("include/foundation/xboxone"); PublicLibraryPaths.Add(PhysXDir + "Lib/XboxOne"); string[] StaticLibrariesXB1 = new string[] { "PhysX3{0}.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}.lib", "PhysX3Common{0}.lib", "PhysX3Vehicle{0}.lib", "PxTask{0}.lib", "PhysXVisualDebuggerSDK{0}.lib", "PhysXProfileSDK{0}.lib" }; foreach (string Lib in StaticLibrariesXB1) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } }
public PhysXCookingLib(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); string PhysXLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/"; // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicAdditionalLibraries.Add(String.Format("PhysX3Cooking{0}_x64.lib", LibrarySuffix)); PublicDelayLoadDLLs.Add(String.Format("PhysX3Cooking{0}_x64.dll", LibrarySuffix)); string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); string FileName = PhysXBinariesDir + String.Format("PhysX3Cooking{0}_x64.dll", LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { PublicAdditionalLibraries.Add(String.Format("PhysX3Cooking{0}_x86.lib", LibrarySuffix)); PublicDelayLoadDLLs.Add(String.Format("PhysX3Cooking{0}_x86.dll", LibrarySuffix)); string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName()); string FileName = PhysXBinariesDir + String.Format("PhysX3Cooking{0}_x86.dll", LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } else if (Target.Platform == UnrealTargetPlatform.Mac) { string PhysXBinariesDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac/"; string LibraryPath = PhysXBinariesDir + String.Format("libPhysX3Cooking{0}.dylib", LibrarySuffix); PublicDelayLoadDLLs.Add(LibraryPath); RuntimeDependencies.Add(new RuntimeDependency(LibraryPath)); } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicAdditionalLibraries.Add(String.Format("PhysX3Cooking{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicAdditionalLibraries.Add(String.Format("PhysX3Cooking{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.IOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "IOS/"); PublicAdditionalLibraries.Add("PhysX3Cooking" + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "libPhysX3Cooking" + LibrarySuffix + ".a")); } else if (Target.Platform == UnrealTargetPlatform.TVOS) { PhysXLibDir = Path.Combine(PhysXLibDir, "TVOS/"); PublicAdditionalLibraries.Add("PhysX3Cooking" + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "libPhysX3Cooking" + LibrarySuffix + ".a")); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/"); string OpimizationSuffix = ""; if (UEBuildConfiguration.bCompileForSize) { OpimizationSuffix = "_Oz"; } else { if (Target.Configuration == UnrealTargetConfiguration.Development) { OpimizationSuffix = "_O2"; } else if (Target.Configuration == UnrealTargetConfiguration.Shipping) { OpimizationSuffix = "_O3"; } } PublicAdditionalLibraries.Add(PhysXLibDir + "PhysX3Cooking" + OpimizationSuffix + ".bc"); } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicAdditionalLibraries.Add(String.Format("PhysX3Cooking{0}", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { PublicAdditionalLibraries.Add(String.Format("PhysX3Cooking{0}.lib", LibrarySuffix)); } else if (Target.Platform == UnrealTargetPlatform.Switch) { PublicAdditionalLibraries.Add("PhysX3Cooking" + LibrarySuffix); } }
public PhysX(TargetInfo Target) { Type = ModuleType.External; // Determine which kind of libraries to link against PhysXLibraryMode LibraryMode = GetPhysXLibraryMode(Target.Configuration); // Quick Mac hack if (Target.Platform == UnrealTargetPlatform.Mac && (LibraryMode == PhysXLibraryMode.Checked || LibraryMode == PhysXLibraryMode.Shipping)) { LibraryMode = PhysXLibraryMode.Profile; } string LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode); Definitions.Add("WITH_PHYSX=1"); if (UEBuildConfiguration.bCompileAPEX == false) { // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but APEX is not. Definitions.Add("WITH_APEX=0"); } if (UEBuildConfiguration.bCompilePhysXVehicle == false) { // Since PhysX Vehicle is dependent on PhysX, if Vehicle is not being include, set the flag properly. // This will properly cover the case where PhysX is compiled but Vehicle is not. Definitions.Add("WITH_VEHICLE=0"); } if (LibraryMode == PhysXLibraryMode.Shipping) { Definitions.Add("WITH_PHYSX_RELEASE=1"); } else { Definitions.Add("WITH_PHYSX_RELEASE=0"); } if (LibraryMode == PhysXLibraryMode.Checked) { Definitions.Add("WITH_PHYSX_CHECKED=1"); } else { Definitions.Add("WITH_PHYSX_CHECKED=0"); } string PhysXVersion = "PhysX-3.3"; string PhysXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/"; string PhysXLibDir = PhysXDir + "lib/"; PublicSystemIncludePaths.AddRange( new string[] { PhysXDir + "include", PhysXDir + "include/foundation", PhysXDir + "include/cooking", PhysXDir + "include/common", PhysXDir + "include/extensions", PhysXDir + "include/geometry", PhysXDir + "include/vehicle" } ); // Libraries and DLLs for windows platform if (Target.Platform == UnrealTargetPlatform.Win64) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/windows"); PhysXLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesX64 = new string[] { "PhysX3{0}_x64.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}_x64.lib", "PhysX3Common{0}_x64.lib", "PhysX3Vehicle{0}.lib", "PxTask{0}.lib", "PhysXVisualDebuggerSDK{0}.lib", "PhysXProfileSDK{0}.lib" }; string[] DelayLoadDLLsX64 = new string[] { "PhysX3{0}_x64.dll", "PhysX3Cooking{0}_x64.dll", "PhysX3Common{0}_x64.dll" }; string[] RuntimeDependenciesX64 = new string[] { "PhysX3{0}_x64.dll", "PhysX3Common{0}_x64.dll", "PhysX3Cooking{0}_x64.dll", }; foreach (string Lib in StaticLibrariesX64) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX64) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } PublicDelayLoadDLLs.Add("nvToolsExt64_1.dll"); string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win64/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in RuntimeDependenciesX64) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } RuntimeDependencies.Add(PhysXBinariesDir + "nvToolsExt64_1.dll", StagedFileType.NonUFS); } else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) { PublicIncludePaths.Add(PhysXDir + "include/foundation/windows"); PhysXLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName(); PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesX86 = new string[] { "PhysX3{0}_x86.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}_x86.lib", "PhysX3Common{0}_x86.lib", "PhysX3Vehicle{0}.lib", "PxTask{0}.lib", "PhysXVisualDebuggerSDK{0}.lib", "PhysXProfileSDK{0}.lib" }; string[] DelayLoadDLLsX86 = new string[] { "PhysX3{0}_x86.dll", "PhysX3Cooking{0}_x86.dll", "PhysX3Common{0}_x86.dll" }; string[] RuntimeDependenciesX86 = new string[] { "PhysX3{0}_x86.dll", "PhysX3Common{0}_x86.dll", "PhysX3Cooking{0}_x86.dll", }; foreach (string Lib in StaticLibrariesX86) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } foreach (string DLL in DelayLoadDLLsX86) { PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix)); } PublicDelayLoadDLLs.Add("nvToolsExt32_1.dll"); string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win32/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName()); foreach (string DLL in RuntimeDependenciesX86) { string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix); RuntimeDependencies.Add(FileName, StagedFileType.NonUFS); RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS); } RuntimeDependencies.Add(PhysXBinariesDir + "nvToolsExt32_1.dll", StagedFileType.NonUFS); } else if (Target.Platform == UnrealTargetPlatform.Mac) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PhysXLibDir += "/osx64"; PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesMac = new string[] { PhysXLibDir + "/libLowLevel{0}.a", PhysXLibDir + "/libLowLevelCloth{0}.a", PhysXLibDir + "/libPhysX3{0}.a", PhysXLibDir + "/libPhysX3Extensions{0}.a", PhysXLibDir + "/libPhysX3Cooking{0}.a", PhysXLibDir + "/libPhysX3Common{0}.a", PhysXLibDir + "/libPhysX3Vehicle{0}.a", PhysXLibDir + "/libPxTask{0}.a", PhysXLibDir + "/libPhysXVisualDebuggerSDK{0}.a", PhysXLibDir + "/libPhysXProfileSDK{0}.a", PhysXLibDir + "/libPvdRuntime{0}.a", PhysXLibDir + "/libSceneQuery{0}.a", PhysXLibDir + "/libSimulationController{0}.a" }; foreach (string Lib in StaticLibrariesMac) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Android) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x86"); PublicLibraryPaths.Add(PhysXLibDir + "Android/arm64"); PublicLibraryPaths.Add(PhysXLibDir + "Android/x64"); string[] StaticLibrariesAndroid = new string[] { "LowLevel{0}", "LowLevelCloth{0}", "PhysX3{0}", "PhysX3Extensions{0}", // "PhysX3Cooking{0}", // not needed until Apex "PhysX3Common{0}", "PhysX3Vehicle{0}", "PxTask{0}", "PhysXVisualDebuggerSDK{0}", "PhysXProfileSDK{0}", "PvdRuntime{0}", "SceneQuery{0}", "SimulationController{0}", }; // shipping libs do not need this if (LibraryMode != PhysXLibraryMode.Shipping) { // use for profiling, but crash handler won't work // PublicAdditionalLibraries.Add("nvToolsExt"); // disables profiling, crash handler will work PublicAdditionalLibraries.Add("nvToolsExtStub"); } foreach (string Lib in StaticLibrariesAndroid) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.Linux) { PhysXLibDir += "/Linux/" + Target.Architecture; PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PublicLibraryPaths.Add(PhysXLibDir); string[] StaticLibrariesLinux = new string[] { "rt", "LowLevel{0}", "LowLevelCloth{0}", "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PhysX3Vehicle{0}", "PxTask{0}", "PhysXVisualDebuggerSDK{0}", "PhysXProfileSDK{0}", "PvdRuntime{0}", "SceneQuery{0}", "SimulationController{0}", }; if (LibraryMode == PhysXLibraryMode.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) { //@TODO: Needed? PublicAdditionalLibraries.Add("m"); } foreach (string Lib in StaticLibrariesLinux) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PhysXLibDir = Path.Combine(PhysXLibDir, Target.Platform.ToString()); PublicLibraryPaths.Add(PhysXLibDir); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelCloth", "PhysX3", "PhysX3Common", // "PhysX3Cooking", // not needed until Apex "PhysX3Extensions", "PhysX3Vehicle", "PxTask", "PhysXVisualDebuggerSDK", "PhysXProfileSDK", "PvdRuntime", "SceneQuery", "SimulationController", }; foreach (string PhysXLib in PhysXLibs) { PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix); PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a")); } } else if (Target.Platform == UnrealTargetPlatform.HTML5) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix"); PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/"); string[] PhysXLibs = new string[] { "LowLevel", "LowLevelCloth", "PhysX3", "PhysX3Common", "PhysX3Cooking", "PhysX3Extensions", "PxTask", "PhysXVisualDebuggerSDK", "PhysXProfileSDK", "PvdRuntime", "SceneQuery", "SimulationController", }; foreach (var lib in PhysXLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } if (UEBuildConfiguration.bCompilePhysXVehicle) { string[] PhysXVehicleLibs = new string[] { "PhysX3Vehicle", }; foreach (var lib in PhysXVehicleLibs) { if (!lib.Contains("Cooking") || Target.IsCooked == false) { PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc"); } } } } else if (Target.Platform == UnrealTargetPlatform.PS4) { PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/PS4"); PublicLibraryPaths.Add(PhysXDir + "lib/PS4"); string[] StaticLibrariesPS4 = new string[] { "PhysX3{0}", "PhysX3Extensions{0}", "PhysX3Cooking{0}", "PhysX3Common{0}", "PhysX3Vehicle{0}", "PxTask{0}", "PhysXVisualDebuggerSDK{0}", "PhysXProfileSDK{0}" }; foreach (string Lib in StaticLibrariesPS4) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } else if (Target.Platform == UnrealTargetPlatform.XboxOne) { // Use reflection to allow type not to exist if console code is not present System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool"); if (XboxOnePlatformType != null) { System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null); PublicSystemIncludePaths.Add("include/foundation/xboxone"); PublicLibraryPaths.Add(PhysXDir + "Lib/XboxOne/VS" + VersionName.ToString()); string[] StaticLibrariesXB1 = new string[] { "PhysX3{0}.lib", "PhysX3Extensions{0}.lib", "PhysX3Cooking{0}.lib", "PhysX3Common{0}.lib", "PhysX3Vehicle{0}.lib", "PxTask{0}.lib", "PhysXVisualDebuggerSDK{0}.lib", "PhysXProfileSDK{0}.lib" }; foreach (string Lib in StaticLibrariesXB1) { PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix)); } } } }