minetest-wasm/build_zstd.sh
2022-03-30 03:04:49 +00:00

31 lines
446 B
Bash
Executable File

#!/bin/bash -eux
source common.sh
if [ ! -d sources/zstd ]; then
pushd sources
git clone https://github.com/facebook/zstd.git zstd
pushd zstd
git checkout v1.5.2
popd
popd
fi
pushd build
rm -rf zstd
mkdir zstd
pushd zstd
export CFLAGS="-D_POSIX_SOURCE=1"
export CXXFLAGS="-D_POSIX_SOURCE=1"
emcmake cmake \
-DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
"$SRC_DIR/zstd/build/cmake"
emmake make
emmake make install
echo "zstd OK"