You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This mirrors a similar change done on Windows and adds a bash script on Mac with the recipe for building USD and its supporting files using CMake directly. This ensures that USD builds specifically against the engine's versions of USD's library dependencies rather than having USD's build script download and build its own versions. Some of the manual steps involved in preparing a build of USD for installation in the engine were rolled into this bash script. When the script completes, the build products are mostly ready to be copied into place, although plugInfo.json files will still need their LibraryPath to be adjusted. With that change in place, we can also now build the usdAbc plugin that is included with USD which adds a file format plugin for reading Alembic files via USD. These changes include the updates to the build process as well as a full rebuild of USD for Mac built using this new setup. It also includes the changes necessary to the Boost module rules in order to link against the engine's version of Boost. The version of USD remains unchanged here, and still represents USD version 21.08, matching Windows and Linux. #rb daniel.coelho, anousack.kitisa #preflight 621fc972f134125ae0aed638, 621fc99e257fd6e099786eb5 [CL 19230465 by matt johnson in ue5-main branch]
52 lines
2.0 KiB
C#
52 lines
2.0 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System.IO;
|
|
using UnrealBuildTool;
|
|
|
|
public class Boost : ModuleRules
|
|
{
|
|
public Boost(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
Type = ModuleType.External;
|
|
|
|
string BoostVersion = "1_70_0";
|
|
string[] BoostLibraries = { "atomic", "chrono", "iostreams", "program_options", "python39", "regex", "system", "thread" };
|
|
|
|
string BoostVersionDir = "boost-" + BoostVersion;
|
|
string BoostPath = Path.Combine(Target.UEThirdPartySourceDirectory, "Boost", BoostVersionDir);
|
|
string BoostIncludePath = Path.Combine(BoostPath, "include");
|
|
PublicSystemIncludePaths.Add(BoostIncludePath);
|
|
|
|
if (Target.Platform == UnrealTargetPlatform.Win64)
|
|
{
|
|
string BoostToolsetVersion = "vc142";
|
|
|
|
string BoostLibPath = Path.Combine(BoostPath, "lib", "Win64");
|
|
string BoostVersionShort = BoostVersion.Substring(BoostVersion.Length - 2) == "_0" ? BoostVersion.Substring(0, BoostVersion.Length - 2) : BoostVersion;
|
|
|
|
foreach (string BoostLib in BoostLibraries)
|
|
{
|
|
string BoostLibName = "boost_" + BoostLib + "-" + BoostToolsetVersion + "-mt-x64" + "-" + BoostVersionShort;
|
|
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, BoostLibName + ".lib"));
|
|
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", BoostLibName + ".dll"), Path.Combine(BoostLibPath, BoostLibName + ".dll"));
|
|
}
|
|
|
|
PublicDefinitions.Add("BOOST_LIB_TOOLSET=\"" + BoostToolsetVersion + "\"");
|
|
PublicDefinitions.Add("BOOST_ALL_NO_LIB");
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Mac)
|
|
{
|
|
string BoostLibPath = Path.Combine(BoostPath, "lib", "Mac");
|
|
|
|
foreach (string BoostLib in BoostLibraries)
|
|
{
|
|
// Note that these file names identify the universal binaries
|
|
// that support both x86_64 and arm64.
|
|
string BoostLibName = "libboost_" + BoostLib + "-mt";
|
|
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, BoostLibName + ".a"));
|
|
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", BoostLibName + ".dylib"), Path.Combine(BoostLibPath, BoostLibName + ".dylib"));
|
|
}
|
|
}
|
|
}
|
|
}
|