-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·64 lines (58 loc) · 1.2 KB
/
build.sh
File metadata and controls
executable file
·64 lines (58 loc) · 1.2 KB
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
#!/bin/bash
set -e
TOOL_CHAIN_CMD=
ENABLE_VIEWER=ON
ENABLE_ASYNC=ON
REGISTER_TIMES=OFF
ENABLE_OMP=ON
FILE_PATH=`pwd`
clean_Thirdparty() {
echo "clean Thirdparty"
cd ${FILE_PATH}/Thirdparty
for file in ./*
do
if [ -d "${file}" ]
then
echo "clean the ${file}"
rm -rf ${file}/build ${file}/lib
fi
done
}
build_Thirdparty() {
echo "build Thirdparty"
cd ${FILE_PATH}/Thirdparty
for file in ./*
do
if [ -d "${file}" ]
then
echo "build the ${file}"
cd ${file}
rm -rf ./build ./lib
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j
# if [ -d "../lib" ]
# then
# cp ../lib/* ../../lib/
# fi
cd ../..
fi
done
}
uncompress_vocabulary() {
echo "Uncompress vocabulary ..."
cd ${FILE_PATH}/Vocabulary
tar -xvf ORBvoc.txt.tar.gz
cd ..
}
# clean_Thirdparty
# build_Thirdparty
# uncompress_vocabulary
# echo "Configuring and building ORB_SLAM3 ..."
# cd ${FILE_PATH}
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_VIEWER=${ENABLE_VIEWER} \
-DENABLE_ASYNC=${ENABLE_ASYNC} -DENABLE_OMP=${ENABLE_OMP} -DREGISTER_TIMES=${REGISTER_TIMES} ${TOOL_CHAIN_CMD}
make -j4