forked from ompl/ompl
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-ompl-ubuntu.sh.in
More file actions
executable file
·111 lines (103 loc) · 2.54 KB
/
install-ompl-ubuntu.sh.in
File metadata and controls
executable file
·111 lines (103 loc) · 2.54 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/bash
set -e
if [ `id -u` == 0 ]; then
export SUDO=
export DEBIAN_FRONTEND=noninteractive
export PIP_ARGS=--break-system-packages
else
SUDO="sudo -H"
fi
install_common_dependencies()
{
# install most dependencies via apt-get
${SUDO} apt-get -y update && \
${SUDO} apt-get -y install \
clang \
cmake \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-serialization-dev \
libboost-system-dev \
libboost-test-dev \
libeigen3-dev \
libexpat1 \
libtriangle-dev \
ninja-build \
pkg-config \
wget
export CXX=clang++
}
install_python_binding_dependencies()
{
${SUDO} apt-get -y install \
castxml \
libboost-numpy-dev \
libboost-python-dev \
python3-celery \
python3-dev \
python3-flask \
python3-numpy \
python3-opengl \
python3-pip \
python3-pyqt5.qtopengl \
pypy3 \
wget && \
# install additional python dependencies via pip
${SUDO} pip3 install ${PIP_ARGS} -vU https://github.com/CastXML/pygccxml/archive/develop.zip pyplusplus
}
install_app_dependencies()
{
${SUDO} apt-get -y install \
freeglut3-dev \
libassimp-dev \
libccd-dev \
libfcl-dev
}
install_ompl()
{
if [ -z $APP ]; then
wget -O - https://github.com/ompl/ompl/archive/@PROJECT_VERSION@.tar.gz | tar zxf -
cd ompl-@PROJECT_VERSION@
else
wget -O - https://github.com/ompl/omplapp/releases/download/@PROJECT_VERSION@/omplapp-@PROJECT_VERSION@-Source.tar.gz | tar zxf -
cd omplapp-@PROJECT_VERSION@-Source
fi
cmake \
-G Ninja \
-B build \
-DPYTHON_EXEC=/usr/bin/python3 \
-DOMPL_REGISTRATION=OFF \
-DCMAKE_INSTALL_PREFIX=/usr && \
cmake --build build -t update_bindings && \
cmake --build build && \
${SUDO} cmake --install build
}
for i in "$@"
do
case $i in
-a|--app)
APP=1
PYTHON=1
shift
;;
-p|--python)
PYTHON=1
shift
;;
*)
# unknown option -> show help
echo "Usage: `basename $0` [-p] [-a]"
echo " -p: enable Python bindings"
echo " -a: enable OMPL.app (implies '-p')"
echo " -g: install latest commit from main branch on GitHub"
;;
esac
done
install_common_dependencies
if [ ! -z $PYTHON ]; then
install_python_binding_dependencies
fi
if [ ! -z $APP ]; then
install_app_dependencies
fi
install_ompl