forked from Intermodalics/ros_android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy_boost.sh
executable file
·34 lines (27 loc) · 872 Bytes
/
copy_boost.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
# Abort script on any failures
set -e
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 prefix_path"
echo " example: $0 /home/user/my_workspace"
exit 1
fi
prefix=$(cd $1 && pwd)
echo
echo -e '\e[34mCopying boost.\e[39m'
echo
[ "$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 $prefix/build/out/arm64-v8a/lib/
for i in *.a # Rename and move libraries (remove the gcc type, so on)
do
#mv "$i" "`echo $i | sed 's/000//'`"
#cp lib/lib*.a ./
cp "$i" $CMAKE_PREFIX_PATH/lib/"`echo $i | sed 's/ *\-.*//'`.a"
done
cd ../include
mkdir -p $CMAKE_PREFIX_PATH/include
cp -R boost-1_68/boost $CMAKE_PREFIX_PATH/include/