ffmpeg-kit/scripts/apple/soxr.sh
2021-01-09 16:03:59 +00:00

44 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# SET BUILD OPTIONS
ASM_OPTIONS=""
case ${ARCH} in
arm64*)
ASM_OPTIONS="-DWITH_CR32S=0 -DWITH_CR64S=0"
;;
esac
mkdir -p "${BUILD_DIR}" || return 1
cd "${BUILD_DIR}" || return 1
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_OSX_SYSROOT="$(get_sdk_name)" \
-DCMAKE_OSX_ARCHITECTURES="$(get_cmake_osx_architectures)" \
-DCMAKE_SYSTEM_NAME="${CMAKE_SYSTEM_NAME}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
-DCMAKE_AR="$(xcrun --sdk $(get_sdk_name) -f ar)" \
-DCMAKE_AS="$AS" \
-DBUILD_TESTS=0 \
-DWITH_DEV_TRACE=0 \
-DWITH_LSR_BINDINGS=0 \
-DWITH_OPENMP=0 \
${ASM_OPTIONS} \
-DCMAKE_SYSTEM_PROCESSOR="$(get_target_cpu)" \
-DBUILD_SHARED_LIBS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1
make -j$(get_cpu_count) || return 1
make install || return 1
# CREATE PACKAGE CONFIG MANUALLY
create_soxr_package_config "0.1.3" || return 1