Allow loading USD files into simulate.
PiperOrigin-RevId: 776584803 Change-Id: I66a5277b3752d69ba5d44ed419204951edb18d41
This commit is contained in:
committed by
Copybara-Service
parent
e97e5d31d0
commit
e80a62c6d5
@@ -174,6 +174,14 @@ if(SIMULATE_BUILD_EXECUTABLE)
|
||||
lodepng
|
||||
)
|
||||
|
||||
if (MUJOCO_WITH_USD)
|
||||
target_link_libraries(
|
||||
simulate
|
||||
mujoco::usd
|
||||
mujoco::usd::mjcf
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_options(simulate PRIVATE ${MUJOCO_SIMULATE_LINK_OPTIONS})
|
||||
|
||||
if(APPLE AND MUJOCO_BUILD_MACOS_FRAMEWORKS)
|
||||
@@ -240,6 +248,22 @@ if(SIMULATE_BUILD_EXECUTABLE)
|
||||
MUJOCO_ENABLE_RPATH
|
||||
)
|
||||
|
||||
if (MUJOCO_WITH_USD)
|
||||
target_compile_definitions(simulate PUBLIC SIMULATE_WITH_USD)
|
||||
|
||||
# Add support to RPATH for the samples.
|
||||
target_add_rpath(
|
||||
TARGETS
|
||||
simulate
|
||||
INSTALL_DIRECTORY
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||
LIB_DIRS
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/mujocoUsd ${USD_DIR}/lib
|
||||
DEPENDS
|
||||
MUJOCO_ENABLE_RPATH
|
||||
)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS simulate
|
||||
EXPORT ${PROJECT_NAME}
|
||||
|
||||
Reference in New Issue
Block a user