diff --git a/CMakeLists.txt b/CMakeLists.txt index 14fb6eec..08e0bd0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/src/experimental/mjz/CMakeLists.txt b/src/xml/mjz/CMakeLists.txt similarity index 60% rename from src/experimental/mjz/CMakeLists.txt rename to src/xml/mjz/CMakeLists.txt index c1dcc4f7..198b4281 100644 --- a/src/experimental/mjz/CMakeLists.txt +++ b/src/xml/mjz/CMakeLists.txt @@ -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) diff --git a/src/experimental/mjz/mjz_decoder.cc b/src/xml/mjz/mjz_decoder.cc similarity index 100% rename from src/experimental/mjz/mjz_decoder.cc rename to src/xml/mjz/mjz_decoder.cc diff --git a/test/xml/mjz/CMakeLists.txt b/test/xml/mjz/CMakeLists.txt new file mode 100644 index 00000000..721be4fc --- /dev/null +++ b/test/xml/mjz/CMakeLists.txt @@ -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 +) diff --git a/test/experimental/mjz/mjz_decoder_test.cc b/test/xml/mjz/mjz_decoder_test.cc similarity index 100% rename from test/experimental/mjz/mjz_decoder_test.cc rename to test/xml/mjz/mjz_decoder_test.cc