Skip to content

Commit

Permalink
Update emscripten buildscript to use emcmake
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Jun 13, 2024
1 parent a2b46f7 commit 42b91eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/build_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ source ./emsdk/emsdk_env.sh
# - this is a custom build for now because I can't build all dependencies
# with emsdk yet

CXXFLAGS="-fexceptions --use-port=sdl2" CC=emcc CXX=em++ cmake -S third_party/ -B osc-deps-build -DOSCDEPS_GET_BENCHMARK=OFF -DOSCDEPS_GET_SDL=OFF -DOSCDEPS_GET_GLEW=OFF -DOSCDEPS_GET_NATIVEFILEDIALOG=OFF -DOSCDEPS_GET_OPENSIM=OFF -DCMAKE_INSTALL_PREFIX=${PWD}/osc-deps-install -DCMAKE_INSTALL_LIBDIR=${PWD}/osc-deps-install/lib
cmake --build osc-deps-build -j20 -v
CXXFLAGS="-fexceptions --use-port=sdl2" emcmake cmake -S third_party/ -B osc-deps-build -DOSCDEPS_GET_BENCHMARK=OFF -DOSCDEPS_GET_SDL=OFF -DOSCDEPS_GET_GLEW=OFF -DOSCDEPS_GET_NATIVEFILEDIALOG=OFF -DOSCDEPS_GET_OPENSIM=OFF -DCMAKE_INSTALL_PREFIX=${PWD}/osc-deps-install -DCMAKE_INSTALL_LIBDIR=${PWD}/osc-deps-install/lib
emmake cmake --build osc-deps-build -j$(nproc) -v

LDFLAGS="-fexceptions -sNO_DISABLE_EXCEPTION_CATCHING=1 -sUSE_WEBGL2=1 -sMIN_WEBGL_VERSION=2 -sFULL_ES2=1 -sFULL_ES3=1 -sUSE_SDL=2" CXXFLAGS="-fexceptions --use-port=sdl2" CC=emcc CXX=em++ cmake -S . -B osc-build -DOSC_EXECUTABLE_SUFFIX=.html -DOSC_BUILD_OPENSIMCREATOR=OFF -DOSC_DISCOVER_TESTS=OFF -DOSC_EMSCRIPTEN=ON -DCMAKE_PREFIX_PATH=${PWD}/osc-deps-install
cmake --build osc-build --target testoscar -v -j20
cmake --build osc-build --target hellotriangle -v -j20
LDFLAGS="-fexceptions -sNO_DISABLE_EXCEPTION_CATCHING=1 -sUSE_WEBGL2=1 -sMIN_WEBGL_VERSION=2 -sFULL_ES2=1 -sFULL_ES3=1 -sUSE_SDL=2" CXXFLAGS="-fexceptions --use-port=sdl2" emcmake cmake -S . -B osc-build -DOSC_EXECUTABLE_SUFFIX=.html -DOSC_BUILD_OPENSIMCREATOR=OFF -DOSC_DISCOVER_TESTS=OFF -DOSC_EMSCRIPTEN=ON -DCMAKE_PREFIX_PATH=${PWD}/osc-deps-install -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH
emmake cmake --build osc-build --target testoscar -v -j$(nproc)
emmake cmake --build osc-build --target hellotriangle -v -j$(nproc)

# run test suite, excluding tests that depend on window/files (work-in-progress)
node osc-build/tests/testoscar/testoscar.js --gtest_filter=-Renderer*:Image*:ResourceStream*
Expand Down

0 comments on commit 42b91eb

Please sign in to comment.