Fix various MuJoCo Studio build issues on Windows, MacOS and Linux

PiperOrigin-RevId: 833313973
Change-Id: I7ec181374e0bb49c32420d025044c31f6fc3c657
This commit is contained in:
Matija Kecman
2025-11-17 06:34:43 -08:00
committed by Copybara-Service
parent a66cf303f8
commit 8eca9926dc
16 changed files with 108 additions and 67 deletions
+4 -1
View File
@@ -276,7 +276,7 @@ if(WIN32)
endif()
endif()
if(MUJOCO_BUILD_TESTS)
if(MUJOCO_BUILD_TESTS OR MUJOCO_BUILD_STUDIO OR MUJOCO_USE_FILAMENT)
set(ABSL_PROPAGATE_CXX_STD ON)
# This specific version of Abseil does not have the following variable. We need to work with BUILD_TESTING
@@ -307,6 +307,9 @@ if(MUJOCO_BUILD_TESTS)
${BUILD_TESTING_OLD}
CACHE BOOL "Build tests." FORCE
)
endif()
if(MUJOCO_BUILD_TESTS)
# Avoid linking errors on Windows by dynamically linking to the C runtime.
set(gtest_force_shared_crt
+5 -1
View File
@@ -28,10 +28,14 @@ set(FILAMENT_SKIP_SDL2 ON)
set(FILAMENT_USE_EXTERNAL_ABSL ON)
set(FILAMENT_USE_EXTERNAL_BENCHMARK ON)
set(FILAMENT_USE_EXTERNAL_GTEST ON)
if(WIN32)
set(USE_STATIC_CRT OFF)
endif()
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)
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD})