vendor: OpenCV 5.0.0 snapshot at 40738fb16ceddb5fb3fea747585f7ce6abb0605b
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
# This file contains documentation snippets for Linux installation tutorial
|
||||
if [ "$1" = "--check" ] ; then
|
||||
sudo()
|
||||
{
|
||||
command $@
|
||||
}
|
||||
fi
|
||||
|
||||
sudo apt update
|
||||
|
||||
# [gcc]
|
||||
sudo apt install -y g++
|
||||
# [gcc]
|
||||
|
||||
# [make]
|
||||
sudo apt install -y make
|
||||
# [make]
|
||||
|
||||
# [cmake]
|
||||
sudo apt install -y cmake
|
||||
# [cmake]
|
||||
|
||||
# [wget]
|
||||
sudo apt install -y wget unzip
|
||||
# [wget]
|
||||
|
||||
# [download]
|
||||
wget -O opencv.zip https://github.com/opencv/opencv/archive/5.x.zip
|
||||
unzip opencv.zip
|
||||
mv opencv-5.x opencv
|
||||
# [download]
|
||||
|
||||
# [prepare]
|
||||
mkdir -p build && cd build
|
||||
# [prepare]
|
||||
|
||||
# [configure]
|
||||
cmake ../opencv
|
||||
# [configure]
|
||||
|
||||
# [build]
|
||||
make -j4
|
||||
# [build]
|
||||
|
||||
# [check]
|
||||
ls bin
|
||||
ls lib
|
||||
# [check]
|
||||
|
||||
# [check cmake]
|
||||
ls OpenCVConfig*.cmake
|
||||
ls OpenCVModules.cmake
|
||||
# [check cmake]
|
||||
|
||||
# [install]
|
||||
sudo make install
|
||||
# [install]
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# This file contains documentation snippets for Linux installation tutorial
|
||||
if [ "$1" = "--check" ] ; then
|
||||
sudo()
|
||||
{
|
||||
command $@
|
||||
}
|
||||
fi
|
||||
|
||||
sudo apt update
|
||||
|
||||
# [clang]
|
||||
sudo apt install -y clang
|
||||
# [clang]
|
||||
|
||||
# [ninja]
|
||||
sudo apt install -y ninja-build
|
||||
# [ninja]
|
||||
|
||||
# [cmake]
|
||||
sudo apt install -y cmake
|
||||
# [cmake]
|
||||
|
||||
# [git]
|
||||
sudo apt install -y git
|
||||
# [git]
|
||||
|
||||
# [download]
|
||||
git clone https://github.com/opencv/opencv.git
|
||||
git -C opencv checkout 5.x
|
||||
# [download]
|
||||
|
||||
# [prepare]
|
||||
mkdir -p build && cd build
|
||||
# [prepare]
|
||||
|
||||
# [configure]
|
||||
cmake -GNinja ../opencv
|
||||
# [configure]
|
||||
|
||||
# [build]
|
||||
ninja
|
||||
# [build]
|
||||
|
||||
# [install]
|
||||
sudo ninja install
|
||||
# [install]
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# This file contains documentation snippets for Linux installation tutorial
|
||||
if [ "$1" = "--check" ] ; then
|
||||
sudo()
|
||||
{
|
||||
command $@
|
||||
}
|
||||
fi
|
||||
|
||||
# [body]
|
||||
# Install minimal prerequisites (Ubuntu 18.04 as reference)
|
||||
sudo apt update && sudo apt install -y cmake g++ wget unzip ninja-build
|
||||
|
||||
# Download and unpack sources
|
||||
wget -O opencv.zip https://github.com/opencv/opencv/archive/5.x.zip
|
||||
unzip opencv.zip
|
||||
|
||||
# Create build directory
|
||||
mkdir -p build && cd build
|
||||
|
||||
# Configure
|
||||
cmake -GNinja ../opencv-5.x
|
||||
|
||||
# Build
|
||||
cmake --build .
|
||||
# [body]
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# This file contains documentation snippets for Linux installation tutorial
|
||||
if [ "$1" = "--check" ] ; then
|
||||
sudo()
|
||||
{
|
||||
command $@
|
||||
}
|
||||
fi
|
||||
|
||||
# [body]
|
||||
# Install minimal prerequisites (Ubuntu 18.04 as reference)
|
||||
sudo apt update && sudo apt install -y cmake g++ wget unzip ninja-build
|
||||
|
||||
# Download and unpack sources
|
||||
wget -O opencv.zip https://github.com/opencv/opencv/archive/5.x.zip
|
||||
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/5.x.zip
|
||||
unzip opencv.zip
|
||||
unzip opencv_contrib.zip
|
||||
|
||||
# Create build directory and switch into it
|
||||
mkdir -p build && cd build
|
||||
|
||||
# Configure
|
||||
cmake -GNinja -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-5.x/modules ../opencv-5.x
|
||||
|
||||
# Build
|
||||
cmake --build .
|
||||
# [body]
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# This script verifies that all shell snippets in the
|
||||
# Linux installation tutorial work (in Ubuntu 20 container)
|
||||
set -e
|
||||
set -x
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
|
||||
containers=(ubuntu:20.04 debian:10)
|
||||
scripts=$(cd "${SCRIPT_DIR}" && ls -1 linux_*install*.sh)
|
||||
|
||||
docker pull debian:10
|
||||
|
||||
for cnt in $containers ; do
|
||||
docker pull ${cnt}
|
||||
for f in $scripts ; do
|
||||
echo "Checking ${f} @ ${cnt}..."
|
||||
docker run -it \
|
||||
-e DEBIAN_FRONTEND=noninteractive \
|
||||
--volume "${SCRIPT_DIR}":/install:ro \
|
||||
${cnt} \
|
||||
/bin/bash -ex /install/${f} --check
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user