FFmpeg-Builds/scripts.d/50-librist/40-mbedtls.sh
2022-04-27 19:06:29 +02:00

27 lines
685 B
Bash
Executable file

#!/bin/bash
MBEDTLS_REPO="https://github.com/ARMmbed/mbedtls.git"
MBEDTLS_COMMIT="v3.1.0"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$MBEDTLS_REPO" "$MBEDTLS_COMMIT" mbedtls
cd mbedtls
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
-DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF \
-DUSE_STATIC_MBEDTLS_LIBRARY=ON -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DINSTALL_MBEDTLS_HEADERS=ON \
..
make -j$(nproc)
make install
}
ffbuild_configure() {
[[ $TARGET == win* ]] && return -1
echo --enable-mbedtls
}