-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusd.patch
46 lines (44 loc) · 2.29 KB
/
usd.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py
index b00449266..04cb4deaa 100644
--- a/build_scripts/build_usd.py
+++ b/build_scripts/build_usd.py
@@ -143,6 +143,10 @@ def IsVisualStudioVersionOrGreater(desiredVersion):
return version >= desiredVersion
return False
+def IsVisualStudio2022OrGreater():
+ VISUAL_STUDIO_2022_VERSION = (16, 0)
+ return IsVisualStudioVersionOrGreater(VISUAL_STUDIO_2022_VERSION)
+
def IsVisualStudio2019OrGreater():
VISUAL_STUDIO_2019_VERSION = (16, 0)
return IsVisualStudioVersionOrGreater(VISUAL_STUDIO_2019_VERSION)
@@ -382,7 +386,9 @@ def RunCMake(context, force, extraArgs = None):
# building a 64-bit project. (Surely there is a better way to do this?)
# TODO: figure out exactly what "vcvarsall.bat x64" sets to force x64
if generator is None and Windows():
- if IsVisualStudio2019OrGreater():
+ if IsVisualStudio2022OrGreater():
+ generator = "Visual Studio 17 2022"
+ elif IsVisualStudio2019OrGreater():
generator = "Visual Studio 16 2019"
elif IsVisualStudio2017OrGreater():
generator = "Visual Studio 15 2017 Win64"
@@ -701,8 +707,8 @@ elif Windows():
#
# boost 1.70 is required for Visual Studio 2019. For simplicity, we use
# this version for all older Visual Studio versions as well.
- BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz"
- BOOST_VERSION_FILE = "include/boost-1_70/boost/version.hpp"
+ BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz"
+ BOOST_VERSION_FILE = "include/boost-1_78/boost/version.hpp"
def InstallBoost_Helper(context, force, buildArgs):
# Documentation files in the boost archive can have exceptionally
@@ -813,6 +819,8 @@ def InstallBoost_Helper(context, force, buildArgs):
b2_settings.append("toolset=msvc-14.1")
elif context.cmakeToolset == "v140":
b2_settings.append("toolset=msvc-14.0")
+ elif IsVisualStudio2022OrGreater():
+ b2_settings.append("toolset=msvc-14.3")
elif IsVisualStudio2019OrGreater():
b2_settings.append("toolset=msvc-14.2")
elif IsVisualStudio2017OrGreater():