Add JavaScript bindings and WASM support
Co-authored-by: Matija Kecman <matijak@google.com> Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar> Co-authored-by: Kyle Bayes <kylebayes@google.com> PiperOrigin-RevId: 826109484 Change-Id: I327fd54122762bd2e239cc31c602a3eb73051c26
This commit is contained in:
committed by
Copybara-Service
parent
76e64d96bb
commit
f2badc05ac
@@ -109,11 +109,7 @@ if(NOT TARGET lodepng)
|
||||
add_library(lodepng STATIC ${LODEPNG_HEADERS} ${LODEPNG_SRCS})
|
||||
target_compile_options(lodepng PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS})
|
||||
target_link_options(lodepng PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS})
|
||||
if(NOT EMSCRIPTEN)
|
||||
target_include_directories(lodepng PUBLIC ${lodepng_SOURCE_DIR})
|
||||
else()
|
||||
target_include_directories(lodepng PUBLIC $<BUILD_INTERFACE:${lodepng_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
||||
endif()
|
||||
target_include_directories(lodepng PUBLIC ${lodepng_SOURCE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -132,10 +128,6 @@ if(NOT TARGET marchingcubecpp)
|
||||
endif()
|
||||
|
||||
set(QHULL_ENABLE_TESTING OFF)
|
||||
# Patch changes in https://github.com/qhull/qhull/pull/173.patch
|
||||
set(QHULL_PATCH_COMMAND
|
||||
git apply --reject --whitespace=fix ${mujoco_SOURCE_DIR}/cmake/qhull-support-emscripten.patch
|
||||
)
|
||||
|
||||
findorfetch(
|
||||
USE_SYSTEM_PACKAGE
|
||||
@@ -151,7 +143,6 @@ findorfetch(
|
||||
TARGETS
|
||||
qhull
|
||||
EXCLUDE_FROM_ALL
|
||||
PATCH_COMMAND ${QHULL_PATCH_COMMAND}
|
||||
)
|
||||
# MuJoCo includes a file from libqhull_r which is not exported by the qhull include directories.
|
||||
# Add it to the target.
|
||||
@@ -231,12 +222,6 @@ endif()
|
||||
|
||||
set(ENABLE_DOUBLE_PRECISION ON)
|
||||
set(CCD_HIDE_ALL_SYMBOLS ON)
|
||||
|
||||
# Patch changes in https://github.com/danfis/libccd/pull/83.patch
|
||||
set(CCD_PATCH_COMMAND
|
||||
git apply --reject --whitespace=fix ${mujoco_SOURCE_DIR}/cmake/ccd-support-emscripten.patch
|
||||
)
|
||||
|
||||
# update cmake_minimum_required version for compatibility with newer version of cmake
|
||||
if(NOT DEFINED CMAKE_POLICY_VERSION_MINIMUM)
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM ${MUJOCO_CMAKE_MIN_REQ})
|
||||
@@ -256,7 +241,6 @@ findorfetch(
|
||||
TARGETS
|
||||
ccd
|
||||
EXCLUDE_FROM_ALL
|
||||
PATCH_COMMAND ${CCD_PATCH_COMMAND}
|
||||
)
|
||||
if(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
||||
unset(CMAKE_POLICY_VERSION_MINIMUM)
|
||||
|
||||
Reference in New Issue
Block a user