Files
Velix-MPV-Core/scripts/build-libplacebo-ohos.sh
T

37 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
set -eu
. "$(dirname -- "$0")/setup-ohos-env.sh"
SOURCE=$OHOS_BUILD_ROOT/sources/libplacebo
BUILD=$OHOS_BUILD_ROOT/build/libplacebo
LOG=$OHOS_BUILD_ROOT/logs/libplacebo.log
test -f "$SOURCE/meson.build" || "$PROJECT_ROOT/scripts/fetch-phase1-sources.sh"
mkdir -p "$OHOS_BUILD_ROOT/logs"
if test -f "$BUILD/meson-private/coredata.dat"; then
setup_mode=--wipe
else
setup_mode=
fi
if ! meson setup "$BUILD" "$SOURCE" $setup_mode \
--cross-file "$CROSS_FILE" --prefix "$PREFIX" --buildtype release \
-Dvulkan=disabled -Dopengl=disabled -Dd3d11=disabled \
-Dglslang=disabled -Dshaderc=disabled -Dlcms=disabled \
-Ddovi=disabled -Dlibdovi=disabled -Dunwind=disabled -Dxxhash=disabled \
-Ddemos=false -Dtests=false -Dbench=false -Dfuzz=false > "$LOG" 2>&1; then
tail -n 140 "$LOG" >&2
exit 1
fi
if ! meson compile -C "$BUILD" >> "$LOG" 2>&1; then
tail -n 180 "$LOG" >&2
exit 1
fi
meson install -C "$BUILD" >> "$LOG" 2>&1
"$PROJECT_ROOT/scripts/verify-static-archive.sh" "$PREFIX/lib/libplacebo.a"
"$PKG_CONFIG" --modversion libplacebo
"$PKG_CONFIG" --variable=pl_has_vulkan libplacebo