2022-09-25 12:10:27 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
OGG_VERSION=1.3.5
|
|
|
|
|
2022-12-02 11:40:55 +01:00
|
|
|
. scripts/sdk.sh
|
|
|
|
mkdir -p deps; cd deps
|
|
|
|
|
2022-11-13 17:35:33 +01:00
|
|
|
if [ ! -d libogg-src ]; then
|
|
|
|
git clone -b v$OGG_VERSION --depth 1 https://github.com/xiph/ogg libogg-src
|
2022-09-25 12:10:27 +02:00
|
|
|
mkdir libogg-src/build
|
|
|
|
fi
|
|
|
|
|
2022-11-13 17:35:33 +01:00
|
|
|
rm -rf libogg
|
|
|
|
|
2022-09-25 12:10:27 +02:00
|
|
|
cd libogg-src/build
|
|
|
|
|
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2022-11-13 17:35:33 +01:00
|
|
|
-DCMAKE_C_FLAGS_RELEASE="$OSX_FLAGS $OSX_ARCH" \
|
|
|
|
-DCMAKE_CXX_FLAGS_RELEASE="$OSX_FLAGS $OSX_ARCH" \
|
2022-09-25 12:10:27 +02:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES=$OSX_ARCHITECTURES
|
2022-11-13 17:35:33 +01:00
|
|
|
|
2022-09-25 12:10:27 +02:00
|
|
|
cmake --build . -j
|
|
|
|
|
|
|
|
mkdir -p ../../libogg
|
2022-11-13 17:35:33 +01:00
|
|
|
cp -v libogg.a ../../libogg
|
|
|
|
cp -rv ../include ../../libogg/include
|
2022-09-25 12:10:27 +02:00
|
|
|
|
|
|
|
echo "Ogg build successful"
|