forked from acados/acados
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·50 lines (41 loc) · 1.63 KB
/
install.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
#!/bin/bash -xe
# Install dependencies
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave liboctave-dev
sudo apt-get install libgsl0-dev liblapack-dev libopenblas-dev libeigen3-dev python3-tk automake libpcre3-dev git cmake python3-dev
sudo apt-get install byacc # swig
sudo apt-get install python3-scipy python3-numpy python3-matplotlib
# Get CasADi for octave, python and matlab
pushd external
wget -q -nc http://files.casadi.org/download/3.4.0/casadi-linux-octave-v3.4.0.tar.gz
mkdir -p casadi-octave-v3.4.0
tar -xf casadi-linux-octave-v3.4.0.tar.gz -C casadi-octave-v3.4.0
wget -q -nc http://files.casadi.org/download/3.4.0/casadi-linux-py35-v3.4.0-64bit.tar.gz
mkdir -p casadi-py35-v3.4.0-64bit
tar -xf casadi-linux-py35-v3.4.0-64bit.tar.gz -C casadi-py35-v3.4.0-64bit
export PYTHONPATH=$(pwd)/casadi-py35-v3.4.0-64bit:$PYTHONPATH
# will not work with custom install dir
export PYTHONPATH=~/local/lib:$PYTHONPATH
wget -q -nc http://files.casadi.org/download/3.4.0/casadi-linux-matlabR2014b-v3.4.0.tar.gz
mkdir -p casadi-matlabR2014b-v3.4.0
tar -xf casadi-linux-matlabR2014b-v3.4.0.tar.gz -C casadi-matlabR2014b-v3.4.0
export MATLABPATH=$(pwd)/casadi-matlabR2014b-v3.4.0:$MATLABPATH
# Get all git submodules
git submodule update --recursive --init
# Install swig
pushd swig
./autogen.sh
./configure --prefix=$(pwd)/swig_install --enable-silent-rules
make
make install > /dev/null # quiet installation
export PATH=$(pwd):$PATH
popd # swig
popd # external
# Build acados
mkdir -p build
pushd build
cmake -D SWIG_MATLAB=1 -D SWIG_PYTHON=1 ..
make install
popd # build