-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathbuild_android.sh
More file actions
executable file
·35 lines (27 loc) · 793 Bytes
/
build_android.sh
File metadata and controls
executable file
·35 lines (27 loc) · 793 Bytes
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
#!/bin/sh
# change to real android NDK path
export NDK_ROOT=/home/jipeng/android-ndk-r27c
if [ ! -d "./proj" ]; then
mkdir proj
fi
cd proj
export PROJECT_ROOT=`pwd`
build_type="-DCMAKE_BUILD_TYPE=Debug"
if [ "$1" = "release" ]; then
build_type="-DCMAKE_BUILD_TYPE=Release"
fi
cmake ${build_type} \
-DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake \
-DANDROID_NDK=${NDK_ROOT} \
-DANDROID_ABI=armeabi-v7a \
-DANDROID_PLATFORM=android-21 \
-DOPT_FORMAT_ABGR=OFF \
-DOPT_FORMAT_BGRA=OFF \
-DOPT_FORMAT_RGBA=OFF \
-DOPT_FORMAT_RGB=OFF \
-DOPT_FORMAT_BGR=OFF \
-DOPT_FORMAT_RGB555=OFF \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${PROJECT_ROOT}/lib \
..
echo "Please change dir to \"proj\" and type \"make\""
echo "...\n"