-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·97 lines (78 loc) · 1.95 KB
/
setup.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
if [ -f /usr/local/lib/libgdal.a ]
then
echo "Found GDAL installed"
else
git clone https://github.com/OSGeo/gdal.git
cd gdal/gdal
./configure
sudo make
sudo make install
cd ../..
rm -rf gdal
fi
if [ -f include ]
then
echo "Include directory already exists"
else
mkdir include
fi
# Download boost
curl -L https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz --output boost.tar.gz
tar -xzf boost.tar.gz
# Copy libraries
cp -r boost_1_68_0/boost/ include/boost/
# Compile boost filesystem and program options
cd boost_1_68_0
./bootstrap.sh --with-libraries=program_options,filesystem,test
./b2 link=static
cp -r stage/lib ../
cd ..
rm -rf boost_1_68_0
rm -rf boost.tar.gz
# Remove libraries that get built and we dont need
rm lib/*boost_prg_exec_monitor*
rm lib/*boost_test_exec_monitor*
rm lib/*boost_timer*
# Download GLM
git clone https://github.com/g-truc/glm.git
cp -r glm/glm/ include/glm/
rm -rf glm
# Compile restbed
git clone https://github.com/Corvusoft/restbed.git --recursive
cd restbed
mkdir build
cd build
cmake -DBUILD_SSL=NO -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=TRUE ..
make restbed-static
make install
cd ../../
cp -r restbed/distribution/library/* lib/
cp -r restbed/distribution/include/* include/
cp restbed/dependency/asio/asio/include/asio.hpp include/asio.hpp
cp -r restbed/dependency/asio/asio/include/asio include/asio/
rm -rf restbed
# Download Eigen
curl -L http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz --output ei.tar.gz
tar -xzf ei.tar.gz
rm ei.tar.gz
cd ei*
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=./Ei
make install
cd ../../
cp -r ei*/build/Ei/include/eigen3 include/eigen3
rm -rf ei*
# Download libpqxx
git clone https://github.com/jtv/libpqxx.git
cd libpqxx
./configure --disable-documentation --prefix=${PWD}/../libpqxx-build
make
make install
cd ../
cp libpqxx-build/lib/*.a lib/
cp -r libpqxx-build/include/ include/
rm -rf libpqxx*
sudo chmod -R 777 include
sudo chmod -R 777 lib