forked from kevleyski/opencv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kjsl_macos_build.sh
executable file
·77 lines (68 loc) · 1.93 KB
/
kjsl_macos_build.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
#!/bin/bash
BUILD=cmake-build-debug
HERE=$PWD
mkdir -p $BUILD
cd $BUILD || exit 1
zlib () {
cd $HERE/.. || exit 1
git clone [email protected]:kevleyski/zlib.git
cd zlib
./configure
make -j8
sudo make install
}
cd $HERE || exit 1
export LDFLAGS="-L/usr/local/opt/libffi/libi,-Wl,-ld_classic"
export CPPFLAGS="-I/usr/local/opt/libffi/include"
brew install openh264
mkdir -p cmake-build-debug
cd cmake-build-debug || exit 1
PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" cmake -D CMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DINSTALL_C_EXAMPLES=ON \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_OSX_DEPLOYMENT_TARGET= \
-DBUILD_JASPER=OFF \
-DBUILD_JPEG=OFF \
-DBUILD_OPENEXR=OFF \
-DBUILD_OPENJPEG=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_PNG=OFF \
-DBUILD_PROTOBUF=OFF \
-DBUILD_TBB=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_TIFF=OFF \
-DBUILD_WEBP=OFF \
-DBUILD_ZLIB=OFF \
-DBUILD_opencv_hdf=OFF \
-DBUILD_opencv_java=OFF \
-DBUILD_opencv_text=ON \
-DOPENCV_ENABLE_NONFREE=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DWITH_FFMPEG=ON \
-DFFMPEG_LIBDIR="/usr/local/lib" -DFFMPEG_INCLUDE_DIRS="/usr/local/include" -D OPENCV_FFMPEG_SKIP_BUILD_CHECK=ON \
-DWITH_OPENCL=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DPROTOBUF_UPDATE_FILES=ON \
-DWITH_1394=OFF \
-DWITH_CUDA=OFF \
-DWITH_EIGEN=ON \
-DWITH_FFMPEG=ON \
-DWITH_GPHOTO2=OFF \
-DWITH_GSTREAMER=OFF \
-DWITH_JASPER=OFF \
-DWITH_OPENEXR=ON \
-DWITH_OPENGL=OFF \
-DWITH_OPENVINO=ON \
-DWITH_QT=OFF \
-DWITH_TBB=ON \
-DWITH_VTK=ON \
-DBUILD_opencv_python2=OFF \
-DBUILD_opencv_python3=ON \
-DBUILD_ZLIB=ON \
-DBUILD_OPENEXR=ON \
-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-DBUILD_EXAMPLES=ON ..
make -j$(nproc)
sudo make install