Rename MuJoCo WASM output artifacts to mujoco.*.
This change updates the Emscripten build to output files named `mujoco.js`, `mujoco.wasm`, and `mujoco.d.ts` instead of `mujoco_wasm.*`. The internal CMake target name remains `mujoco_wasm` to avoid conflicts. The package name in `package.json` is also updated to `mujoco`. New enum tests are added. PiperOrigin-RevId: 875140314 Change-Id: Ie03e0d1db2d03dd8582d5bfcb260b3d33549c2c9
This commit is contained in:
committed by
Copybara-Service
parent
757758dd2e
commit
940cab2508
+8
-2
@@ -46,13 +46,19 @@ set(EMCC_LINKER_FLAGS
|
||||
"-s DISABLE_EXCEPTION_CATCHING=0"
|
||||
"-gsource-map"
|
||||
"-g"
|
||||
"--emit-tsd mujoco_wasm.d.ts"
|
||||
"--emit-tsd mujoco.d.ts"
|
||||
)
|
||||
string (REPLACE ";" " " EMCC_LINKER_FLAGS_STR "${EMCC_LINKER_FLAGS}")
|
||||
|
||||
add_executable(mujoco_wasm ${MUJOCO_WASM_FILES})
|
||||
|
||||
set_target_properties(mujoco_wasm PROPERTIES LINK_FLAGS "${EMCC_LINKER_FLAGS_STR}")
|
||||
# Keep the internal target name distinct to avoid colliding with the native
|
||||
# `mujoco` library target, but emit artifacts named `mujoco.*` by setting the
|
||||
# output name. Also apply the emscripten linker flags to the wasm target.
|
||||
set_target_properties(mujoco_wasm PROPERTIES
|
||||
LINK_FLAGS "${EMCC_LINKER_FLAGS_STR}"
|
||||
OUTPUT_NAME "mujoco"
|
||||
)
|
||||
|
||||
target_link_libraries(mujoco_wasm ccd lodepng mujoco tinyxml2 qhullstatic_r)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user