From 2c2773e36dabeef7f075076eef18d367f28c7431 Mon Sep 17 00:00:00 2001 From: Haroon Qureshi Date: Thu, 6 Nov 2025 08:00:51 -0800 Subject: [PATCH] Include third_party_deps cmake files. PiperOrigin-RevId: 828957097 Change-Id: I2aeea2ae9e2621c8c62a34095af6ea8fd0797f08 --- cmake/third_party_deps/dear_imgui.cmake | 31 +++++++++++++++++++++ cmake/third_party_deps/filament.cmake | 37 +++++++++++++++++++++++++ cmake/third_party_deps/implot.cmake | 31 +++++++++++++++++++++ cmake/third_party_deps/libwebp.cmake | 28 +++++++++++++++++++ cmake/third_party_deps/sdl2.cmake | 28 +++++++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 cmake/third_party_deps/dear_imgui.cmake create mode 100644 cmake/third_party_deps/filament.cmake create mode 100644 cmake/third_party_deps/implot.cmake create mode 100644 cmake/third_party_deps/libwebp.cmake create mode 100644 cmake/third_party_deps/sdl2.cmake diff --git a/cmake/third_party_deps/dear_imgui.cmake b/cmake/third_party_deps/dear_imgui.cmake new file mode 100644 index 00000000..7df03d1a --- /dev/null +++ b/cmake/third_party_deps/dear_imgui.cmake @@ -0,0 +1,31 @@ +# Copyright 2025 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. + +set(MUJOCO_DEP_VERSION_dear_imgui + v1.90.9-docking + CACHE STRING "Tag/version of `dear_imgui` to be fetched." +) +mark_as_advanced(MUJOCO_DEP_VERSION_dear_imgui) + +include(FindOrFetch) + +fetchpackage( + PACKAGE_NAME dear_imgui + GIT_REPO https://github.com/ocornut/imgui.git + GIT_TAG ${MUJOCO_DEP_VERSION_dear_imgui} + PATCH_COMMAND + "cp" + "${CMAKE_SOURCE_DIR}/cmake/third_party_deps/dear_imgui/CMakeLists.txt" + "${FETCHCONTENT_BASE_DIR}/dear_imgui-src/CMakeLists.txt" +) diff --git a/cmake/third_party_deps/filament.cmake b/cmake/third_party_deps/filament.cmake new file mode 100644 index 00000000..eb507471 --- /dev/null +++ b/cmake/third_party_deps/filament.cmake @@ -0,0 +1,37 @@ +# Copyright 2025 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. + +set(MUJOCO_DEP_VERSION_filament + a4945939de514d049baeed654efbbdd06bc5bdbf + CACHE STRING "Tag/version of `filament` to be fetched." +) +mark_as_advanced(MUJOCO_DEP_VERSION_filament) + +include(FindOrFetch) + +set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) +set(BUILD_SHARED_LIBS OFF) + +set(FILAMENT_ENABLE_EXPERIMENTAL_GCC_SUPPORT ON) +set(FILAMENT_SKIP_SDL2 ON) +set(FILAMENT_USE_EXTERNAL_ABSL ON) +set(FILAMENT_USE_EXTERNAL_BENCHMARK ON) +set(FILAMENT_USE_EXTERNAL_GTEST ON) +fetchpackage( + PACKAGE_NAME filament + GIT_REPO https://github.com/google/filament.git + GIT_TAG ${MUJOCO_DEP_VERSION_filament} +) + +set(BUILD_SHARED_LIBS BUILD_SHARED_LIBS_OLD) diff --git a/cmake/third_party_deps/implot.cmake b/cmake/third_party_deps/implot.cmake new file mode 100644 index 00000000..2926d635 --- /dev/null +++ b/cmake/third_party_deps/implot.cmake @@ -0,0 +1,31 @@ +# Copyright 2025 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. + +set(MUJOCO_DEP_VERSION_implot + v0.16 + CACHE STRING "Tag/version of `implot` to be fetched." +) +mark_as_advanced(MUJOCO_DEP_VERSION_implot) + +include(FindOrFetch) + +fetchpackage( + PACKAGE_NAME implot + GIT_REPO https://github.com/epezent/implot.git + GIT_TAG ${MUJOCO_DEP_VERSION_implot} + PATCH_COMMAND + "cp" + "${CMAKE_SOURCE_DIR}/cmake/third_party_deps/implot/CMakeLists.txt" + "${FETCHCONTENT_BASE_DIR}/implot-src/CMakeLists.txt" +) diff --git a/cmake/third_party_deps/libwebp.cmake b/cmake/third_party_deps/libwebp.cmake new file mode 100644 index 00000000..4eadcc2e --- /dev/null +++ b/cmake/third_party_deps/libwebp.cmake @@ -0,0 +1,28 @@ +# Copyright 2025 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. + +set(MUJOCO_DEP_VERSION_libwebp + v1.6.0 + CACHE STRING "Tag/version of `libwebp` to be fetched." +) +mark_as_advanced(MUJOCO_DEP_VERSION_libwebp) + +include(FindOrFetch) + +fetchpackage( + PACKAGE_NAME libwebp + GIT_REPO https://github.com/webmproject/libwebp.git + GIT_TAG ${MUJOCO_DEP_VERSION_libwebp} + TARGETS webp +) diff --git a/cmake/third_party_deps/sdl2.cmake b/cmake/third_party_deps/sdl2.cmake new file mode 100644 index 00000000..f310eee4 --- /dev/null +++ b/cmake/third_party_deps/sdl2.cmake @@ -0,0 +1,28 @@ +# Copyright 2025 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. + +set(MUJOCO_DEP_VERSION_sdl2 + 98d1f3a45aae568ccd6ed5fec179330f47d4d356 + CACHE STRING "Version of `SDL2` to be fetched." +) +mark_as_advanced(MUJOCO_DEP_VERSION_sdl2) + +include(FindOrFetch) + +set(SDL_SHARED_ENABLED_BY_DEFAULT OFF) +fetchpackage( + PACKAGE_NAME sdl2 + GIT_REPO https://github.com/libsdl-org/SDL.git + GIT_TAG ${MUJOCO_DEP_VERSION_sdl2} +)