1
0

33 lines
744 B
Bash
Raw Permalink Normal View History

#!/bin/bash -e
VORBIS_VERSION=1.3.7
. scripts/sdk.sh
mkdir -p deps; cd deps
2022-11-13 17:35:33 +01:00
if [ ! -d libvorbis-src ]; then
git clone -b v$VORBIS_VERSION --depth 1 https://github.com/xiph/vorbis libvorbis-src
mkdir libvorbis-src/build
fi
rm -rf libvorbis
cd libvorbis-src/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
2022-11-13 17:35:33 +01:00
-DOGG_LIBRARY="../../libogg/libogg.a" \
-DOGG_INCLUDE_DIR="../../libogg/include" \
-DCMAKE_C_FLAGS_RELEASE="$OSX_FLAGS $OSX_ARCH" \
-DCMAKE_CXX_FLAGS_RELEASE="$OSX_FLAGS $OSX_ARCH" \
-DCMAKE_OSX_ARCHITECTURES=$OSX_ARCHITECTURES
2022-11-13 17:35:33 +01:00
cmake --build . -j
mkdir -p ../../libvorbis
2022-11-13 17:35:33 +01:00
cp -v lib/libvorbis.a ../../libvorbis
cp -v lib/libvorbisfile.a ../../libvorbis
cp -rv ../include ../../libvorbis/include
echo "Vorbis build successful"