fix: build error
parent
8e08ae7e76
commit
8d23b76738
|
@ -0,0 +1,5 @@
|
|||
export OPENH264_ARCH=arm64
|
||||
export OPENH264_OS=darwin
|
||||
export FFMPEG_ARCH=arm64
|
||||
|
||||
bash build.sh --arch arm64
|
4
build.sh
4
build.sh
|
@ -2,6 +2,10 @@ export ARCH=$(uname -m)
|
|||
# do not use all cpus because my computer dies
|
||||
export JOBS=$(awk -v count=$(nproc) 'BEGIN { print ( int( count - 1 ) ) }')
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
export JOBS=$(awk -v count=$(sysctl -n hw.ncpu) 'BEGIN { print ( int ( count - 1 ) ) }')
|
||||
fi
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--arch)
|
||||
|
|
|
@ -12,15 +12,13 @@ cp -r $amfPath/amf/public/include $PREFIX/include/AMF
|
|||
|
||||
make distclean
|
||||
|
||||
flags="--cc=$CC --cxx=$CXX"
|
||||
|
||||
if [[ $FFMPEG_MSVC == 1 ]]; then
|
||||
flags="--toolchain=msvc"
|
||||
fi
|
||||
|
||||
./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
||||
LDFLAGS="-arch $ARCH" ./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
||||
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
|
||||
--enable-libopenh264 \
|
||||
--enable-libopenh264 --cc="${CC:-clang -arch $ARCH}" --cxx="${CXX:-g++ -arch $ARCH}" \
|
||||
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
|
||||
--pkg-config-flags="--static" --target-os=$FFMPEG_OS \
|
||||
${flags} ${FFBUILD_FLAGS}
|
||||
|
|
|
@ -16,7 +16,7 @@ git clone https://github.com/cisco/openh264 $projectDir -b v$OPENH264_VERSION --
|
|||
|
||||
cd $projectDir
|
||||
|
||||
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=$CC CXX=$CXX AR=$AR"
|
||||
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=\"${CC:-clang}\" CXX=\"${CXX:-g++}\" AR=\"${AR:-ar}\""
|
||||
|
||||
make clean
|
||||
|
||||
|
|
Loading…
Reference in New Issue