mirror of
https://github.com/opencv/opencv.git
synced 2024-12-19 12:07:59 +08:00
27 lines
521 B
Bash
27 lines
521 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/master.zip
|
||
|
unzip opencv.zip
|
||
|
|
||
|
# Create build directory
|
||
|
mkdir -p build && cd build
|
||
|
|
||
|
# Configure
|
||
|
cmake ../opencv-master
|
||
|
|
||
|
# Build
|
||
|
cmake --build .
|
||
|
# [body]
|