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