opencv/samples/install/linux_quick_install.sh
Alexander Alekhin a0d5277e0d Merge branch 4.x
2021-12-30 21:43:45 +00:00

27 lines
515 B
Bash

#!/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
# 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 ../opencv-5.x
# Build
cmake --build .
# [body]