Move mjz_decoder out of experimental to xml/mjz.

Since the mjz format is just an archive for MJCF assets this seems like a sensible place. The upcoming mjz encoder will also need to make use of the full precision XML utility that is local to src/xml.

PiperOrigin-RevId: 912044746
Change-Id: I6a9fef24b1c3fec5b5edc3a8d4c8e22584273264
This commit is contained in:
Sam Haves
2026-05-07 10:51:28 -07:00
committed by Copybara-Service
parent 5f36cb9e64
commit eddfbcfc50
5 changed files with 24 additions and 21 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ if(MUJOCO_BUILD_SIMULATE)
endif()
if(MUJOCO_BUILD_STUDIO)
add_subdirectory(src/experimental/mjz)
add_subdirectory(src/xml/mjz)
add_subdirectory(src/experimental/platform)
add_subdirectory(src/experimental/studio)
endif()
@@ -11,27 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.16)
set(MUJOCO_MJZ_TARGET_NAME mujoco_mjz)
add_library(${MUJOCO_MJZ_TARGET_NAME} STATIC)
target_include_directories(${MUJOCO_MJZ_TARGET_NAME} PRIVATE
../..
)
target_sources(${MUJOCO_MJZ_TARGET_NAME}
PUBLIC
mjz_decoder.cc
)
include(third_party_deps/miniz)
target_link_libraries(${MUJOCO_MJZ_TARGET_NAME}
miniz
mujoco::mujoco
set(MUJOCO_MJZ_SRCS
mjz_decoder.cc
)
add_library(mujoco::mjz ALIAS ${MUJOCO_MJZ_TARGET_NAME})
target_sources(mujoco PRIVATE ${MUJOCO_MJZ_SRCS})
target_link_libraries(mujoco miniz)
+19
View File
@@ -0,0 +1,19 @@
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
mujoco_test(mjz_api_test)
mujoco_test(
mjz_decoder_test
)