forked from UZ-SLAMLab/ORB_SLAM3
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
57 lines (51 loc) · 1.3 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
# Set this path. Dependencies are assumed to be installed to this folder:
#ORBSLAM3_INSTALL_DIR="$HOME/dev/slamtest/install"
ORBSLAM3_INSTALL_DIR=""
echo "ORBSLAM3_INSTALL_DIR=$ORBSLAM3_INSTALL_DIR"
# Note: no need for separately building third-party libraries, these will be built by the main CMakeLists.
#echo "Configuring and building Thirdparty/DBoW2 ..."
#cd Thirdparty/DBoW2
#mkdir build
#cd build
#cmake .. \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_PREFIX_PATH=$ORBSLAM3_INSTALL_DIR
#make -j2
#
#echo "Configuring and building Thirdparty/g2o ..."
#cd ../../g2o
#mkdir build
#cd build
#cmake .. \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_PREFIX_PATH=$ORBSLAM3_INSTALL_DIR
#make -j2
#
#echo "Configuring and building Thirdparty/Sophus ..."
#cd ../../Sophus
#mkdir build
#cd build
#cmake .. -DCMAKE_BUILD_TYPE=Release
#make -j2
#cd ../../../
echo "Uncompress vocabulary ..."
cd Vocabulary
tar -xf ORBvoc.txt.tar.gz
cd ..
echo "Configuring and building ORB_SLAM3 ..."
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$ORBSLAM3_INSTALL_DIR \
-DCMAKE_INSTALL_PREFIX=$ORBSLAM3_INSTALL_DIR
# Build
make -j2
# Install (optional)
if [ "$ORBSLAM3_INSTALL_DIR" = "" ]; then
echo "ORBSLAM3_INSTALL_DIR is empty!"
else
echo "Installing to $ORBSLAM3_INSTALL_DIR"
make install
fi
cd ..