Expose ability to go from USD stage to MjSpec.
PiperOrigin-RevId: 776184388 Change-Id: I0325b347c9896183d148a196897e1e5d0c4bbde2
This commit is contained in:
committed by
Copybara-Service
parent
672746f509
commit
afc35451a0
@@ -12,7 +12,22 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if(MUJOCO_BUILD_USD_PLUGINS AND MUJOCO_USD_TARGET STREQUAL "USD")
|
||||
# Only support testing when building against a standalone version of USD.
|
||||
if(MUJOCO_WITH_USD AND USD_DIR)
|
||||
find_package(pxr REQUIRED)
|
||||
|
||||
add_library(usd_test_utils STATIC usd/test_utils.h usd/test_utils.cc)
|
||||
target_include_directories(usd_test_utils PUBLIC ${MUJOCO_TEST_INCLUDE})
|
||||
target_compile_definitions(usd_test_utils PUBLIC MJSTATIC)
|
||||
target_link_libraries(
|
||||
usd_test_utils
|
||||
PUBLIC usd
|
||||
tf
|
||||
gtest
|
||||
gmock
|
||||
mujoco
|
||||
)
|
||||
|
||||
add_subdirectory(usd/plugins/mjcf)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -12,19 +12,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
find_package(pxr REQUIRED)
|
||||
|
||||
add_library(usd_fixture STATIC fixture.h fixture.cc)
|
||||
target_include_directories(usd_fixture PUBLIC ${MUJOCO_TEST_INCLUDE})
|
||||
target_compile_definitions(usd_fixture PUBLIC MJSTATIC)
|
||||
|
||||
target_link_libraries(
|
||||
usd_fixture
|
||||
PUBLIC usd
|
||||
tf
|
||||
gtest
|
||||
gmock
|
||||
mujoco
|
||||
)
|
||||
|
||||
mujoco_test(mjcf_file_format_test ADDITIONAL_LINK_LIBRARIES usd tf usdGeom usdImaging usdPhysics usdShade usd_fixture)
|
||||
mujoco_test(mjcf_file_format_test ADDITIONAL_LINK_LIBRARIES
|
||||
usd
|
||||
tf
|
||||
usdGeom
|
||||
usdImaging
|
||||
usdPhysics
|
||||
usdShade
|
||||
usd_test_utils
|
||||
mjcPhysics
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user