-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·82 lines (74 loc) · 2.25 KB
/
build.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
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
#!/bin/bash
mkdir deps &> /dev/null
cd deps
#Add necessary extra repos
version=$(lsb_release -a 2>&1)
if [[ $version == *"14.04"* ]] ; then
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
rm cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda-7-5
elif [[ $version == *"15.04"* ]] ; then
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1504/x86_64/cuda-repo-ubuntu1504_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1504_7.5-18_amd64.deb
rm cuda-repo-ubuntu1504_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda-7-5
elif [[ $version == *"16.04"* ]] ; then
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
rm cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install cuda-8-0
else
echo "Don't use this on anything except 14.04, 15.04, or 16.04"
exit
fi
sudo apt-get install -y cmake-qt-gui git build-essential libusb-1.0-0-dev libudev-dev openjdk-7-jdk freeglut3-dev libglew-dev libsuitesparse-dev libeigen3-dev zlib1g-dev libjpeg-dev
#Installing Pangolin
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ../ -DAVFORMAT_INCLUDE_DIR="" -DCPP11_NO_BOOST=ON
make -j8
cd ../..
#Up to date OpenNI2
git clone https://github.com/occipital/OpenNI2.git
cd OpenNI2
make -j8
cd ../
git clone https://github.com/martinruenz/densecrf.git
cd densecrf
mkdir -p build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fPIC" \
..
make -j8
cd ../..
git clone https://github.com/carlren/gSLICr.git
cd gSLICr
mkdir -p build
cd build
cmake \
-DOpenCV_DIR="${OpenCV_DIR}" \
-DCMAKE_BUILD_TYPE=Release \
-DCUDA_HOST_COMPILER=/usr/bin/gcc-5 \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -D_FORCE_INLINES" \
..
make -j8
cd ../..
cd ..
mkdir -p build
cd build
cmake \
-DBOOST_ROOT="${BOOST_ROOT}" \
-DOpenCV_DIR="${OpenCV_DIR}" \
-DPangolin_DIR="${Pangolin_DIR}" \
..
make -j8
cd ..