forked from torrvision/pyORBSLAM2
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build_under_conda.sh
executable file
·49 lines (39 loc) · 1.12 KB
/
build_under_conda.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
#!/bin/bash
set -x
cd ${0%%$(basename $0)}
CWD=`pwd`
cd install
chmod +x boost.sh && ./boost.sh || exit 1
chmod +x dbow3.sh && ./dbow3.sh || exit 1
cd ..
mkdir build
cd build
if [[ "$BUILD_PYTHON" == "python3" ]]; then
BUILD_PYTHON3="ON"
pip3 install wheel
else
BUILD_PYTHON3="OFF"
pip install wheel
fi
if [[ "$OSTYPE" == "linux-gnu" || "$OSTYPE" == "linux" || "$OSTYPE" == "darwin"* ]]; then
cmake -DBUILD_PYTHON3=$BUILD_PYTHON3 \
-DBUILD_STATICALLY_LINKED=OFF \
-DDBoW3_DIR=$CWD/install/DBow3/build \
-DDBoW3_INCLUDE_DIRS=$CWD/install/DBow3/src \
-DCMAKE_BUILD_TYPE=Release ../src && make
#elif [[ "$OSTYPE" == "darwin"* ]]; then
# : # no support
elif [[ "$OSTYPE" == "cygwin" ]]; then
: # POSIX compatibility layer and Linux environment emulation for Windows
elif [[ "$OSTYPE" == "msys" ]]; then
: # shell and GNU utilities compiled for Windows as part of MinGW
elif [[ "$OSTYPE" == "win32" ]]; then
: # good luck
elif [[ "$OSTYPE" == "freebsd"* ]]; then
: # ...
else
: # Unknown.
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
ln -s pyDBoW3.dylib pyDBoW3.so
fi