forked from garyservin/roscpp_android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_poco.sh
executable file
·34 lines (26 loc) · 999 Bytes
/
build_poco.sh
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
#!/bin/bash
my_loc="$(cd "$(dirname $0)" && pwd)"
source $my_loc/config.sh
source $my_loc/utils.sh
if [ $# != 1 ] || [ $1 == '-h' ] || [ $1 == '--help' ]; then
echo "Usage: $0 boost_source_dir"
echo " example: $0 /home/user/my_workspace/poco-1.4.6p2"
exit 1
fi
prefix=$(cd $1 && pwd)
cd $1
# Create a stand alone version of the android toolchain
echo Building POCO...
if [ ! -d toolchain/ ]; then
mkdir toolchain/
$ANDROID_NDK/build/tools/make-standalone-toolchain.sh --platform=android-8 --install-dir=./toolchain --ndk-dir=$ANDROID_NDK --system=linux-x86_64
fi
./configure --config=Android --no-samples --no-tests
export PATH=$PATH:$1/toolchain/bin
make -s -j8
[ "$CMAKE_PREFIX_PATH" = "" ] && die 'could not find target basedir. Have you run build_catkin.sh and sourced setup.bash?'
mkdir -p $CMAKE_PREFIX_PATH/lib
cd $CMAKE_PREFIX_PATH/lib
ln -sf $prefix/lib/Android/armeabi/lib*.a ./
mkdir -p ../include && cd ../include
ln -sf $prefix/Foundation/include/Poco ./