1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00
srs/trunk/3rdparty/srt-1-fit/scripts/build-android/mkmbedtls
Haibo Chen c5e067fb0b
Upgrade libsrt to v1.5.3. v5.0.183 v6.0.81 (#3808)
fix https://github.com/ossrs/srs/issues/3155
Build srt-1-fit fails with `standard attributes in middle of
decl-specifiers` on GCC 12,Arch Linux.

See https://github.com/Haivision/srt/releases/tag/v1.5.3
2023-09-21 22:23:56 +08:00

27 lines
730 B
Bash
Executable file

#!/bin/sh
while getopts s:i:t:n:a: option
do
case "${option}"
in
s) SRC_DIR=${OPTARG};;
i) INSTALL_DIR=${OPTARG};;
t) ARCH_ABI=${OPTARG};;
n) NDK_ROOT=${OPTARG};;
a) API_LEVEL=${OPTARG};;
*) twentytwo=${OPTARG};;
esac
done
BUILD_DIR=/tmp/mbedtls_android_build
rm -rf $BUILD_DIR
mkdir $BUILD_DIR
cd $BUILD_DIR
cmake -DENABLE_TESTING=Off -DUSE_SHARED_MBEDTLS_LIBRARY=On \
-DCMAKE_PREFIX_PATH=$INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_ANDROID_NDK=$NDK_ROOT \
-DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=$API_LEVEL -DCMAKE_ANDROID_ARCH_ABI=$ARCH_ABI \
-DCMAKE_C_FLAGS="-fPIC" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--build-id" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo $SRC_DIR
cmake --build .
cmake --install .