-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_cpp.sh
More file actions
executable file
·53 lines (34 loc) · 1.29 KB
/
install_cpp.sh
File metadata and controls
executable file
·53 lines (34 loc) · 1.29 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
#!/usr/bin/env bash
set -euxo pipefail
# NOTE: If you get build errors related to python interpreter check under Linux then run the following command:
# export WITH_PYTHON_INTERP_CHECK=ON
# ====================================================
# import the utils
. bash_utils.sh
# ====================================================
#set -e
#echo ROOT_DIR: $ROOT_DIR
cd $ROOT_DIR # from bash_utils.sh
# ====================================================
# check if we have external options
EXTERNAL_OPTIONS=$@
if [[ -n "$EXTERNAL_OPTIONS" ]]; then
echo "external option: $EXTERNAL_OPTIONS"
fi
OpenCV_DIR="$ROOT_DIR/thirdparty/opencv/install/lib/cmake/opencv4"
if [[ -d "$OpenCV_DIR" ]]; then
EXTERNAL_OPTIONS="$EXTERNAL_OPTIONS -DOpenCV_DIR=$OpenCV_DIR"
fi
echo "EXTERNAL_OPTIONS: $EXTERNAL_OPTIONS"
print_blue '================================================'
print_blue "Building and installing cpp ..."
CURRENT_USED_PYENV=$(get_virtualenv_name)
print_blue "currently used pyenv: $CURRENT_USED_PYENV"
cd cpp
# build utils
cd utils
. build.sh $EXTERNAL_OPTIONS # use . in order to inherit python env configuration
cd ..
cd ..
# NOTE: If you get build errors related to python interpreter check under Linux then run the following command:
# export WITH_PYTHON_INTERP_CHECK=ON