Add CMakeLists for usdMjcf file format plugin.
This adds an option MUJOCO_BUILD_USD_PLUGINS to the top level CMakeLists which allows us to build the usdMjcf file format plugin with the rest of mujoco. In this first version, we allow building against either standalone USD or against Houdini (DCC) since it has it's own fork of USD. When building against standalone USD we also build the file format tests. PiperOrigin-RevId: 753969974 Change-Id: If691eecbddf45d18b7c4ff76f7650999d42e99c5
This commit is contained in:
committed by
Copybara-Service
parent
02656532c2
commit
ab63a7e824
@@ -42,6 +42,14 @@ option(MUJOCO_BUILD_EXAMPLES "Build samples for MuJoCo" ON)
|
||||
option(MUJOCO_BUILD_SIMULATE "Build simulate library for MuJoCo" ON)
|
||||
option(MUJOCO_BUILD_TESTS "Build tests for MuJoCo" ON)
|
||||
option(MUJOCO_TEST_PYTHON_UTIL "Build and test utility libraries for Python bindings" ON)
|
||||
option(MUJOCO_BUILD_USD_PLUGINS "Build OpenUSD plugins" OFF)
|
||||
|
||||
# USD libs to compile against.
|
||||
set(MUJOCO_USD_ALLOWED_TARGET_VALUES "USD" "Houdini")
|
||||
set(MUJOCO_USD_TARGET "USD" CACHE STRING "Select the USD target for the project.")
|
||||
set_property(CACHE MUJOCO_USD_TARGET
|
||||
PROPERTY STRINGS ${MUJOCO_USD_ALLOWED_TARGET_VALUES}
|
||||
)
|
||||
|
||||
if(APPLE AND (MUJOCO_BUILD_EXAMPLES OR MUJOCO_BUILD_SIMULATE))
|
||||
enable_language(OBJC)
|
||||
@@ -181,6 +189,10 @@ if(MUJOCO_BUILD_EXAMPLES)
|
||||
add_subdirectory(sample)
|
||||
endif()
|
||||
|
||||
if(MUJOCO_BUILD_USD_PLUGINS)
|
||||
add_subdirectory(src/experimental/usd/plugins)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING AND MUJOCO_BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
|
||||
Reference in New Issue
Block a user