-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-linux.sh
executable file
·81 lines (77 loc) · 2.05 KB
/
build-linux.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
set -euo pipefail
CONFIG="${1?}"
VERSION="${2?}"
OPENCV_DIR="${3-opencv}"
cmake opencv "$OPENCV_DIR" -B build_$1 \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=$1 \
-DOPENCV_FORCE_3RDPARTY_BUILD=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_opencv_apps=OFF \
-DBUILD_opencv_js=OFF \
-DBUILD_ANDROID_PROJECTS=OFF \
-DBUILD_ANDROID_EXAMPLES=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_PACKAGE=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DBUILD_WITH_STATIC_CRT=OFF \
-DBUILD_WITH_DYNAMIC_IPP=OFF \
-DBUILD_FAT_JAVA_LIB=OFF \
-DBUILD_ANDROID_SERVICE=OFF \
-DBUILD_CUDA_STUBS=OFF \
-DBUILD_JAVA=OFF \
-DBUILD_OBJC=OFF \
-DBUILD_opencv_python3=OFF \
-DINSTALL_CREATE_DISTRIB=OFF \
-DINSTALL_BIN_EXAMPLES=OFF \
-DINSTALL_C_EXAMPLES=OFF \
-DINSTALL_PYTHON_EXAMPLES=OFF \
-DINSTALL_ANDROID_EXAMPLES=OFF \
-DINSTALL_TO_MANGLED_PATHS=OFF \
-DINSTALL_TESTS=OFF \
-DBUILD_opencv_calib3d=OFF \
-DBUILD_opencv_core=ON \
-DBUILD_opencv_dnn=OFF \
-DBUILD_opencv_features2d=ON \
-DBUILD_opencv_flann=OFF \
-DBUILD_opencv_gapi=OFF \
-DBUILD_opencv_highgui=ON \
-DBUILD_opencv_imgcodecs=ON \
-DBUILD_opencv_imgproc=ON \
-DBUILD_opencv_ml=OFF \
-DBUILD_opencv_objdetect=OFF \
-DBUILD_opencv_photo=ON \
-DBUILD_opencv_stitching=OFF \
-DBUILD_opencv_video=ON \
-DBUILD_opencv_videoio=ON \
-DWITH_PNG=OFF \
-DWITH_JPEG=OFF \
-DWITH_TIFF=OFF \
-DWITH_WEBP=OFF \
-DWITH_OPENJPEG=OFF \
-DWITH_JASPER=OFF \
-DWITH_OPENEXR=OFF \
-DWITH_FFMPEG=OFF \
-DWITH_GSTREAMER=OFF \
-DWITH_1394=OFF \
-DWITH_PROTOBUF=OFF \
-DBUILD_PROTOBUF=OFF \
-DWITH_CAROTENE=OFF \
-DWITH_EIGEN=OFF \
-DWITH_OPENVX=OFF \
-DWITH_CLP=OFF \
-DWITH_DIRECTX=OFF \
-DWITH_VA=OFF \
-DWITH_LAPACK=OFF \
-DWITH_QUIRC=OFF \
-DWITH_ADE=OFF \
-DWITH_ITT=OFF \
-DWITH_OPENCL=OFF \
-DWITH_IPP=OFF
cmake --build "build_$CONFIG"
cmake --install "build_$CONFIG" --prefix "release/$CONFIG"
tar -C "release/$CONFIG" -cvf "release/opencv-linux-$VERSION-$CONFIG.tar.gz" .