mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 04:36:36 +08:00
46ccde82cf
Installation tutorials rework * Doc: general installation, config reference, linux installation * Doc: addressed review comments * Minor fixes
29 lines
712 B
Bash
29 lines
712 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
|
|
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/master.zip
|
|
unzip opencv.zip
|
|
unzip opencv_contrib.zip
|
|
|
|
# Create build directory and switch into it
|
|
mkdir -p build && cd build
|
|
|
|
# Configure
|
|
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-master/modules ../opencv-master
|
|
|
|
# Build
|
|
cmake --build .
|
|
# [body]
|