Create build.sh
Browse files
build.sh
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# 1. Clone OpenCV (minimal version)
|
2 |
+
git clone --depth 1 --branch 4.5.5 https://github.com/opencv/opencv.git
|
3 |
+
mkdir -p opencv/build
|
4 |
+
cd opencv/build
|
5 |
+
|
6 |
+
# 2. Build OpenCV with only needed modules
|
7 |
+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../opencv-install -DBUILD_LIST=core,imgproc,highgui,imgcodecs -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF
|
8 |
+
make -j4
|
9 |
+
make install
|
10 |
+
cd ../../
|