-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·36 lines (33 loc) · 839 Bytes
/
build.sh
File metadata and controls
executable file
·36 lines (33 loc) · 839 Bytes
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
#!/bin/bash
# Download opencv
if [ -d "opencv" ]; then
echo "Opencv folder exists. Skip downloading."
else
echo "Download opencv-3.4.12 sources."
git clone https://github.com/opencv/opencv --branch 3.4.12 --depth 1
fi
# Build opencv
if [ -d "opencv/build" ]; then
echo "opencv/build folder exists. Skip building."
else
echo "Build opencv."
mkdir -p opencv/build
pushd opencv/build
cmake -D WITH_FFMPEG=ON \
-D CMAKE_INSTALL_PREFIX=../../dependencies \
-D BUILD_opencv_java=OFF \
-D BUILD_opencv_python=OFF \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_EXAMPLES=OFF \
-D BUILD_DOCS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_TESTS=OFF ..
make -j7
make install
popd
fi
# Build this project
mkdir -p build
cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
make -j8