Enable MuJoCo Studio build and packaging on macos.
Also: - Packages MuJoCo Studio as MuJoCoStudio.app in the MuJoCo.dmg. - Fixes a Filament compile issue. - Patches libwebp to fix compile error related to universal builds and forces it to build as static. - Removes the separate, obsolete "build_studio" step. PiperOrigin-RevId: 934564785 Change-Id: I50c83283b5e138062e37d53926a5a77fdf99dbfa
This commit is contained in:
committed by
Copybara-Service
parent
8db92ab4a9
commit
e7ef6528b7
@@ -0,0 +1,8 @@
|
||||
diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake
|
||||
--- a/cmake/cpu.cmake
|
||||
+++ b/cmake/cpu.cmake
|
||||
@@ -121,3 +121,3 @@
|
||||
# Explicitly disable SIMD.
|
||||
- if(SIMD_DISABLE_FLAGS)
|
||||
+ if(SIMD_DISABLE_FLAGS AND NOT APPLE)
|
||||
list(GET SIMD_DISABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
|
||||
@@ -32,6 +32,11 @@ else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include cstring -include optional")
|
||||
endif()
|
||||
|
||||
# Filament generates deprecated warnings on MacOS.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
|
||||
endif()
|
||||
|
||||
set(FILAMENT_ENABLE_EXPERIMENTAL_GCC_SUPPORT ON)
|
||||
set(FILAMENT_SKIP_SDL2 ON)
|
||||
set(FILAMENT_USE_EXTERNAL_ABSL ON)
|
||||
|
||||
@@ -20,9 +20,21 @@ mark_as_advanced(MUJOCO_DEP_VERSION_libwebp)
|
||||
|
||||
include(FindOrFetch)
|
||||
|
||||
set(LIBWEBP_PATCH_COMMAND
|
||||
git apply --reject --whitespace=fix ${mujoco_SOURCE_DIR}/cmake/libwebp-apple-float16.patch
|
||||
)
|
||||
|
||||
set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
fetchpackage(
|
||||
PACKAGE_NAME libwebp
|
||||
GIT_REPO https://github.com/webmproject/libwebp.git
|
||||
GIT_TAG ${MUJOCO_DEP_VERSION_libwebp}
|
||||
TARGETS webp
|
||||
PATCH_COMMAND ${LIBWEBP_PATCH_COMMAND}
|
||||
)
|
||||
|
||||
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user