Skip to content

Commit b7a3ef5

Browse files
committedJun 1, 2020
Update to ubuntu 2024
1 parent 812d4b5 commit b7a3ef5

File tree

1 file changed

+45
-42
lines changed

1 file changed

+45
-42
lines changed
 

‎build.sh

+45-42
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
set -e
2-
echo ubuntu soft core unlimited >> /etc/security/limits.conf
3-
echo ubuntu hard core unlimited >> /etc/security/limits.conf
1+
export TMP=/tmp/build
42
export DEBIAN_FRONTEND=noninteractive
5-
cd /tmp
3+
apt-get update -qq && apt-get upgrade -qq
64

7-
# Upgrade system
8-
apt-get -y update && apt-get upgrade -y
9-
10-
# Install dependencies
115
apt-get install -y \
126
build-essential \
137
cmake \
@@ -24,7 +18,6 @@ apt-get install -y \
2418
libboost-graph-dev \
2519
libcgal-dev \
2620
libcgal-qt5-dev \
27-
libeigen3-dev \
2821
libfreeimage-dev \
2922
libgflags-dev \
3023
libglew-dev \
@@ -45,50 +38,60 @@ apt-get install -y \
4538
qtbase5-dev \
4639
libatlas-base-dev \
4740
libsuitesparse-dev
48-
mkdir /tmp/build
4941

50-
# Install openmvg
51-
git clone --recursive https://github.com/openMVG/openMVG.git /tmp/build/openmvg
52-
mkdir /tmp/build/openmvg_build && cd /tmp/build/openmvg_build
53-
cmake -DCMAKE_BUILD_TYPE=RELEASE . /tmp/build/openmvg/src -DCMAKE_INSTALL_PREFIX=/opt/openmvg
54-
make -j4 && make install
42+
mkdir -p $TMP && cd $TMP
43+
44+
# Install OpenMVG
45+
git clone -b develop --recursive https://github.com/openMVG/openMVG.git ${TMP}/openmvg && \
46+
mkdir ${TMP}/openmvg_build && cd ${TMP}/openmvg_build && \
47+
cmake -DCMAKE_BUILD_TYPE=RELEASE . ../openmvg/src -DCMAKE_INSTALL_PREFIX=/opt/openmvg && \
48+
make -j4 && \
49+
make install
5550

5651
# Install eigen
57-
hg clone https://bitbucket.org/eigen/eigen#3.2 /tmp/build/eigen
58-
mkdir /tmp/build/eigen_build && cd /tmp/build/eigen_build
59-
cmake . ../eigen
60-
make -j4 && make install
52+
git clone https://gitlab.com/libeigen/eigen.git --branch 3.2 ${TMP}/eigen && \
53+
mkdir ${TMP}/eigen_build && cd ${TMP}/eigen_build && \
54+
cmake . ../eigen && \
55+
make -j4 && \
56+
make install
6157

6258
# Get vcglib
63-
git clone https://github.com/cdcseacave/VCG.git /tmp/build/vcglib
59+
git clone https://github.com/cdcseacave/VCG.git ${TMP}/vcglib
6460

6561
# Install ceres solver
66-
git clone https://ceres-solver.googlesource.com/ceres-solver /tmp/build/ceres_solver
67-
cd /tmp/build/ceres_solver && git checkout tags/1.14.0
68-
mkdir /tmp/build/ceres_build && cd /tmp/build/ceres_build
69-
cmake . ../ceres_solver/ -DMINIGLOG=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
70-
make -j4
71-
make install
62+
git clone https://ceres-solver.googlesource.com/ceres-solver ${TMP}/ceres_solver && \
63+
cd ${TMP}/ceres_solver && git checkout tags/1.14.0 && \
64+
mkdir ${TMP}/ceres_build && cd ${TMP}/ceres_build && \
65+
cmake . ../ceres_solver/ -DMINIGLOG=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF && \
66+
make -j4 && \
67+
make install
7268

7369
# Install openmvs
74-
git clone https://github.com/cdcseacave/openMVS.git /tmp/build/openmvs
75-
mkdir /tmp/build/openmvs_build && cd /tmp/build/openmvs_build
76-
cmake . ../openmvs -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="/tmp/build/vcglib" -DCMAKE_INSTALL_PREFIX=/opt/openmvs
77-
make -j4
78-
make install
70+
git clone https://github.com/cdcseacave/openMVS.git ${TMP}/openmvs && \
71+
mkdir ${TMP}/openmvs_build && cd ${TMP}/openmvs_build && \
72+
cmake . ../openmvs -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="../vcglib" -DCMAKE_INSTALL_PREFIX=/opt/openmvs && \
73+
make -j4 && \
74+
make install
7975

8076
# Install cmvs-pmvs
81-
git clone https://github.com/pmoulon/CMVS-PMVS /tmp/build/cmvs-pmvs
82-
mkdir /tmp/build/cmvs-pmvs_build && cd /tmp/build/cmvs-pmvs_build
83-
cmake ../cmvs-pmvs/program -DCMAKE_INSTALL_PREFIX=/opt/cmvs
84-
make -j4
85-
make install
77+
git clone https://github.com/pmoulon/CMVS-PMVS ${TMP}/cmvs-pmvs && \
78+
mkdir ${TMP}/cmvs-pmvs_build && cd ${TMP}/cmvs-pmvs_build && \
79+
cmake ../cmvs-pmvs/program -DCMAKE_INSTALL_PREFIX=/opt/cmvs && \
80+
make -j4 && \
81+
make install
8682

8783
# Install colmap
88-
git clone -b master https://github.com/colmap/colmap /tmp/build/colmap
89-
mkdir -p /tmp/build/colmap_build && cd /tmp/build/colmap_build
90-
cmake . ../colmap -DCMAKE_INSTALL_PREFIX=/opt/colmap
91-
make -j4
92-
make install
84+
# master and dev broken so commenting for now
85+
#git clone -b master https://github.com/colmap/colmap /tmp/build/colmap && \
86+
# mkdir -p /tmp/build/colmap_build && cd /tmp/build/colmap_build && \
87+
# cmake . ../colmap -DCMAKE_INSTALL_PREFIX=/opt/colmap && \
88+
# make -j4 && \
89+
# make install
90+
91+
# Install dpg
92+
git clone https://github.com/rennu/dpg.git /opt/dpg
93+
94+
echo 'Add following to your .bashrc file to add commands to your PATH'
95+
echo 'PATH=/opt/openmvs/bin/OpenMVS:/opt/openmvg/bin:/opt/cmvs/bin:/opt/colmap/bin:/opt/dpg:$PATH'
96+
9397

94-
rm -rf /tmp/build

0 commit comments

Comments
 (0)
Please sign in to comment.