@@ -1534,10 +1534,23 @@ def InstallMaterialX(context, force, buildArgs):
15341534 ]
15351535
15361536 if MacOSTargetEmbedded (context ):
1537+ # The materialXShaderGen in hdSt assumes the GLSL shadergen is
1538+ # available but MaterialX intertwines GLSL shadergen support with
1539+ # also requiring rendering support.
15371540 cmakeOptions .extend ([
15381541 '-DMATERIALX_BUILD_GEN_MSL=ON' ,
1539- '-DMATERIALX_BUILD_GEN_GLSL=OFF ' ,
1542+ '-DMATERIALX_BUILD_GEN_GLSL=ON ' ,
15401543 '-DMATERIALX_BUILD_IOS=ON' ])
1544+ PatchFile ("CMakeLists.txt" ,
1545+ [(' set(MATERIALX_BUILD_GEN_GLSL OFF)' ,
1546+ ' set(MATERIALX_BUILD_GEN_GLSL ON)' ),
1547+ (' if (MATERIALX_BUILD_GEN_GLSL)\n ' +
1548+ ' add_subdirectory(source/MaterialXRenderGlsl)\n ' +
1549+ ' endif()' ,
1550+ ' if (MATERIALX_BUILD_GEN_GLSL AND NOT MATERIALX_BUILD_IOS)\n ' +
1551+ ' add_subdirectory(source/MaterialXRenderGlsl)\n ' +
1552+ ' endif()' )
1553+ ], multiLineMatches = True )
15411554
15421555 cmakeOptions += buildArgs
15431556 RunCMake (context , force , cmakeOptions )
@@ -1830,8 +1843,8 @@ def InstallUSD(context, force, buildArgs):
18301843
18311844- Embedded Build Targets
18321845When cross compiling for an embedded target operating system, e.g. iOS, the
1833- following components are disabled: python, tools, imaging, tests, examples,
1834- tutorials .
1846+ following components are disabled: python, tools, tests, examples, tutorials ,
1847+ opencolorio, openimageio, openvdb .
18351848
18361849- Python Versions and DCC Plugins:
18371850Some DCCs may ship with and run using their own version of Python. In that case,
@@ -2265,9 +2278,11 @@ def __init__(self, args):
22652278
22662279 # - Imaging
22672280 self .buildImaging = (args .build_imaging == IMAGING or
2268- args .build_imaging == USD_IMAGING ) and not embedded
2281+ args .build_imaging == USD_IMAGING )
22692282 self .enablePtex = self .buildImaging and args .enable_ptex
2270- self .enableOpenVDB = self .buildImaging and args .enable_openvdb
2283+ self .enableOpenVDB = (self .buildImaging
2284+ and args .enable_openvdb
2285+ and not embedded )
22712286
22722287 # - USD Imaging
22732288 self .buildUsdImaging = (args .build_imaging == USD_IMAGING )
@@ -2282,9 +2297,10 @@ def __init__(self, args):
22822297 self .buildPrman = self .buildImaging and args .build_prman
22832298 self .prmanLocation = (os .path .abspath (args .prman_location )
22842299 if args .prman_location else None )
2285- self .buildOIIO = args .build_oiio or (self .buildUsdImaging
2286- and self .buildTests )
2287- self .buildOCIO = args .build_ocio
2300+ self .buildOIIO = ((args .build_oiio or (self .buildUsdImaging
2301+ and self .buildTests ))
2302+ and not embedded )
2303+ self .buildOCIO = args .build_ocio and not embedded
22882304
22892305 # - Alembic Plugin
22902306 self .buildAlembic = args .build_alembic
@@ -2421,8 +2437,14 @@ def ForceBuildDependency(self, dep):
24212437 if "--tools" in sys .argv :
24222438 PrintError ("Cannot build tools for embedded build targets" )
24232439 sys .exit (1 )
2424- if "--imaging" in sys .argv :
2425- PrintError ("Cannot build imaging for embedded build targets" )
2440+ if "--openimageio" in sys .argv :
2441+ PrintError ("Cannot build openimageio for embedded build targets" )
2442+ sys .exit (1 )
2443+ if "--opencolorio" in sys .argv :
2444+ PrintError ("Cannot build opencolorio for embedded build targets" )
2445+ sys .exit (1 )
2446+ if "--openvdb" in sys .argv :
2447+ PrintError ("Cannot build openvdb for embedded build targets" )
24262448 sys .exit (1 )
24272449
24282450# Error out if user explicitly specified building usdview without required
0 commit comments