Skip to content

Commit

Permalink
Merge pull request #2468 from mattyjams/pr/skip_building_usdImaging_t…
Browse files Browse the repository at this point in the history
…ools_without_GPU_or_OpenGL

usdBakeMtlx, usdrecord: skip building usdImaging tools if GPU and/or OpenGL are unavailable

(Internal change: 2306343)
  • Loading branch information
pixar-oss committed Nov 28, 2023
2 parents da51eb8 + c5c5489 commit 5f55a7c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pxr/usdImaging/bin/usdBakeMtlx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
set(PXR_PREFIX pxr/usdImaging)
set(PXR_PACKAGE usdBakeMtlx)

# MaterialX's MaterialXRenderGlsl library, which is used by usdBakeMtlx,
# requires OpenGL.
if (NOT ${PXR_ENABLE_GL_SUPPORT})
message(STATUS
"Skipping ${PXR_PACKAGE} because PXR_ENABLE_GL_SUPPORT is OFF")
return()
endif()

pxr_library(usdBakeMtlx
LIBRARIES
tf
Expand Down
8 changes: 8 additions & 0 deletions pxr/usdImaging/bin/usdrecord/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
set(PXR_PREFIX pxr/usdImaging)
set(PXR_PACKAGE usdrecord)

# usdrecord has usdAppUtils as a dependency, which is only built when GPU
# support is enabled.
if (NOT ${PXR_BUILD_GPU_SUPPORT})
message(STATUS
"Skipping ${PXR_PACKAGE} because PXR_BUILD_GPU_SUPPORT is OFF")
return()
endif()

pxr_python_bin(usdrecord
DEPENDENCIES
usd
Expand Down

0 comments on commit 5f55a7c

Please # to comment.