CI:mac: Add option to not build ffmpeg to dependency build script

This commit is contained in:
TellowKrinkle 2024-04-14 14:11:45 -05:00 committed by Connor McLaughlin
parent c0b36a482a
commit 3fea71731f
1 changed files with 22 additions and 16 deletions

View File

@ -7,6 +7,10 @@ if [ "$#" -ne 1 ]; then
exit 1
fi
# The bundled ffmpeg has a lot of things disabled to reduce code size.
# Users may want to use system ffmpeg for additional features
: ${BUILD_FFMPEG:=1}
export MACOSX_DEPLOYMENT_TARGET=11.0
NPROCS="$(getconf _NPROCESSORS_ONLN)"
@ -102,6 +106,7 @@ make -C build "-j$NPROCS"
make -C build install
cd ..
if [ "$BUILD_FFMPEG" -ne 0 ]; then
echo "Installing FFmpeg..."
rm -fr "ffmpeg-$FFMPEG"
tar xf "ffmpeg-$FFMPEG.tar.xz"
@ -118,6 +123,7 @@ LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
make "-j$NPROCS"
make install
cd ..
fi
echo "Installing Zstd..."
rm -fr "zstd-$ZSTD"