-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild_libthorvg.sh
More file actions
executable file
·41 lines (35 loc) · 1.01 KB
/
Copy pathbuild_libthorvg.sh
File metadata and controls
executable file
·41 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
ABI_ARG="${1:-all}"
build_one() {
abi_dir="$1"
cross_file="$ROOT_DIR/thorvg-core/build/tmp/android_cross_${abi_dir}.txt"
build_dir="build-${abi_dir}"
if [ ! -f "$cross_file" ]; then
echo "Cross build file not found: $cross_file"
echo "Run the setupCrossBuild Gradle task first for your host shell."
exit 1
fi
cd "$ROOT_DIR/thorvg"
rm -rf "$build_dir"
meson setup "$build_dir" -Dloaders="svg, lottie, webp, jpg, png" -Dengines="cpu, gl" -Dextra="opengl_es, lottie_exp, openmp" -Dpartial=false --cross-file "$cross_file" -Ddefault_library=static
ninja -C "$build_dir"
}
case "$ABI_ARG" in
arm64-v8a)
build_one "arm64-v8a"
;;
x86_64)
build_one "x86_64"
;;
all)
build_one "arm64-v8a"
build_one "x86_64"
;;
*)
echo "Unsupported ABI argument: $ABI_ARG"
echo "Use arm64-v8a, x86_64, or all."
exit 1
;;
esac