Skip to content

Commit

Permalink
scripts/configure to add emcmake for WASM build
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWielemaker committed Dec 20, 2024
1 parent 915dcce commit f1bd567
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ generator=Ninja
export CC=
export CXX=
opts=
cmake=cmake

config=$(basename $(pwd))

Expand Down Expand Up @@ -181,6 +182,7 @@ case $config in
source $WASM_HOME/emsdk/emsdk_env.sh
TOOLCHAIN=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
[ -f $TOOLCHAIN ] || echo "Could not find emscripten toolchain"
cmake="emcmake cmake"
build_type=Release
LDFLAGS+=" -s STACK_SIZE=1048576"
opts+=" -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN"
Expand Down Expand Up @@ -234,7 +236,7 @@ fi
cat > configure << EOF
# Created by ../scripts/configure for $config at $(date)
$using cmake -DCMAKE_BUILD_TYPE=$build_type -G $generator $opts ..
$using $cmake -DCMAKE_BUILD_TYPE=$build_type -G $generator $opts ..
EOF
chmod +x configure

Expand Down

0 comments on commit f1bd567

Please sign in to comment.