Add separate build step for OpenUSD to third_party_deps.
This will fetch and call the build_usd.py build helper for OpenUSD and build within the MuJoCo _deps folder. Simplifying the build process for MuJoCo with USD. Users can still provide their own USD build, but must now do so via pxr_DIR. PiperOrigin-RevId: 846735578 Change-Id: I0da7eb2da6465e2d518084340e762bf370adb6d5
This commit is contained in:
committed by
Copybara-Service
parent
76e0a78b32
commit
9e150fe82c
+12
-4
@@ -185,7 +185,7 @@ if(SIMULATE_BUILD_EXECUTABLE)
|
||||
target_link_libraries(simulate "-framework CoreVideo")
|
||||
endif()
|
||||
|
||||
if (MUJOCO_WITH_USD)
|
||||
if (BUILD_WITH_USD)
|
||||
# pxr/usd/tf/hashset.h might include deprecated headers so disable this check
|
||||
# when compiling with USD enabled.
|
||||
target_compile_options(
|
||||
@@ -265,8 +265,13 @@ if(SIMULATE_BUILD_EXECUTABLE)
|
||||
MUJOCO_ENABLE_RPATH
|
||||
)
|
||||
|
||||
if (MUJOCO_WITH_USD)
|
||||
target_compile_definitions(simulate PUBLIC mjUSEUSD)
|
||||
if (BUILD_WITH_USD)
|
||||
# pxr/usd/tf/hashset.h might include deprecated headers so disable this check
|
||||
# when compiling with USD enabled.
|
||||
target_compile_options(
|
||||
simulate
|
||||
PRIVATE -Wno-deprecated
|
||||
)
|
||||
|
||||
# Add support to RPATH for the samples.
|
||||
target_add_rpath(
|
||||
@@ -275,10 +280,13 @@ if(SIMULATE_BUILD_EXECUTABLE)
|
||||
INSTALL_DIRECTORY
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||
LIB_DIRS
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/mujocoUsd ${USD_DIR}/lib
|
||||
DEPENDS
|
||||
MUJOCO_ENABLE_RPATH
|
||||
)
|
||||
|
||||
# Do we need this?
|
||||
#target_link_options(simulate PRIVATE -rpath=${pxr_DIR}/lib)
|
||||
|
||||
endif()
|
||||
|
||||
if(NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW)
|
||||
|
||||
Reference in New Issue
Block a user