-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_opencv_git.sh
executable file
·51 lines (48 loc) · 1.25 KB
/
install_opencv_git.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
#!/bin/bash
if [ -d opencv ]; then
cd opencv
git pull
cd ..
else
git clone https://github.com/Itseez/opencv.git
fi
if [ -d opencv_contrib ]; then
cd opencv_contrib
git pull
cd ..
else
git clone https://github.com/Itseez/opencv_contrib.git
fi
_cmakeopts=('-D CMAKE_BUILD_TYPE=Release'
'-D CMAKE_INSTALL_PREFIX=/usr'
'-D PYTHON_EXECUTABLE=/usr/bin/python'
'-D CMAKE_SKIP_RPATH=ON'
'-D BUILD_TESTS=OFF'
'-D ENABLE_SSE=ON'
'-D ENABLE_SSE2=ON'
'-D ENABLE_SSE3=ON'
'-D ENABLE_SSSE3=ON'
'-D ENABLE_SSE41=ON'
'-D ENABLE_SSE42=ON'
'-D BUILD_EXAMPLES=OFF'
'-D INSTALL_C_EXAMPLES=OFF'
'-D INSTALL_PYTHON_EXAMPLES=OFF'
'-D WITH_XINE=OFF'
'-D WITH_QT=OFF'
'-D WITH_QT_OPENGL=OFF'
'-D WITH_UNICAP=OFF'
'-D WITH_PVAPI=OFF'
'-D WITH_OPENNI=ON'
'-D WITH_TBB=OFF'
'-D WITH_IPP=OFF'
'-D WITH_CUDA=OFF'
'-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules'
'-D USE_FAST_MATH=ON')
cd opencv
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake ${_cmakeopts[@]} ..
make
sudo make install