ffmpeg-kit/scripts/linux/libilbc.sh

35 lines
982 B
Bash
Raw Normal View History

2022-06-03 15:38:10 +03:00
#!/bin/bash
2023-07-17 01:59:12 +03:00
# INIT SUBMODULES
${SED_INLINE} 's|/abseil/|/arthenica/|g' "${BASEDIR}"/src/"${LIB_NAME}"/.gitmodules || return 1
git submodule update --init || return 1
2022-06-03 15:38:10 +03:00
2023-07-17 01:59:12 +03:00
mkdir -p "${BUILD_DIR}" || return 1
cd "${BUILD_DIR}" || return 1
2022-06-03 15:38:10 +03:00
2023-07-17 01:59:12 +03:00
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
-DCMAKE_AR="$AR" \
-DCMAKE_AS="$AS" \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_system_processor) \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DUNIX=1 \
2023-08-05 23:24:51 +03:00
-DBUILD_SHARED_LIBS=0 \
2023-07-17 01:59:12 +03:00
"${BASEDIR}"/src/"${LIB_NAME}" || return 1
2022-06-03 15:38:10 +03:00
make -j$(get_cpu_count) || return 1
make install || return 1
# MANUALLY COPY PKG-CONFIG FILES
2023-07-17 01:59:12 +03:00
cp "${BUILD_DIR}"/libilbc.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1