forked from crigroup/openrave-installation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-osg.sh
executable file
·35 lines (31 loc) · 961 Bytes
/
install-osg.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
35
#!/bin/bash
#
# Authors:
# Francisco Suarez <fsuarez6.github.io>
#
# Description:
# OpenRAVE Installation Script: OpenSceneGraph
# Check ubuntu version
UBUNTU_VER=$(lsb_release -sr)
if [ ${UBUNTU_VER} != '14.04' ] && [ ${UBUNTU_VER} != '16.04' ] && [ ${UBUNTU_VER} != '18.04' ]; then
echo "ERROR: Unsupported Ubuntu version: ${UBUNTU_VER}"
echo " Supported versions are: 14.04, 16.04 and 18.04"
exit 1
fi
# OpenSceneGraph
OSG_COMMIT=1f89e6eb1087add6cd9c743ab07a5bce53b2f480
echo ""
echo "Installing OpenSceneGraph 3.4 from source (Commit ${OSG_COMMIT})..."
echo ""
mkdir -p ~/8_git; cd ~/8_git
git clone git@github.com:openscenegraph/OpenSceneGraph.git
cd OpenSceneGraph; git reset --hard ${OSG_COMMIT}
mkdir build; cd build
if [ ${UBUNTU_VER} = '14.04' ]; then
cmake ..
elif [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ]; then
cmake -DDESIRED_QT_VERSION=4 ..
fi
make -j `nproc`
sudo make install
sudo make install_ld_conf