mirror of
https://github.com/opencv/opencv.git
synced 2024-12-03 00:10:21 +08:00
46ccde82cf
Installation tutorials rework * Doc: general installation, config reference, linux installation * Doc: addressed review comments * Minor fixes
59 lines
770 B
Bash
59 lines
770 B
Bash
#!/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/master.zip
|
|
unzip opencv.zip
|
|
mv opencv-master 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]
|