Skip to content

Commit de8454c

Browse files
SConstruct : Fix building with USD 25.05 on Windows
1 parent df50dcf commit de8454c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

SConstruct

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,13 +2094,23 @@ else :
20942094
"work"
20952095
]
20962096

2097+
if env["PLATFORM"] == "win32" :
2098+
pxrVersionHeader = env.FindFile( "pxr/pxr.h", dependencyIncludes )
2099+
if pxrVersionHeader is not None and "#define PXR_USE_INTERNAL_BOOST_PYTHON\n" in open( str( pxrVersionHeader ) ) :
2100+
# Windows builds currently require both boost_python and USD's internal library,
2101+
# ideally we'd only link to one of them...
2102+
usdLibs.append( "python" )
2103+
20972104
if usdEnv["USD_LIB_PREFIX"] :
20982105
usdLibs = [ usdEnv["USD_LIB_PREFIX"] + x for x in usdLibs ]
20992106

21002107
usdEnvAppends = {
21012108
"CXXFLAGS" : [
21022109
"-Wno-deprecated" if env["PLATFORM"] != "win32" else "",
21032110
"/Zc:inline-" if env["PLATFORM"] == "win32" else "",
2111+
# This warning is already disabled generally for release builds,
2112+
# but also requires disabling for debug builds with USD.
2113+
"/wd4702" if env["PLATFORM"] == "win32" else "",
21042114
"-DIECoreUSD_EXPORTS",
21052115
systemIncludeArgument, "$USD_INCLUDE_PATH",
21062116
systemIncludeArgument, "$PYTHON_INCLUDE_PATH",

0 commit comments

Comments
 (0)