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
48 lines
633 B
Bash
48 lines
633 B
Bash
#!/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 master
|
|
# [download]
|
|
|
|
# [prepare]
|
|
mkdir -p build && cd build
|
|
# [prepare]
|
|
|
|
# [configure]
|
|
cmake -GNinja ../opencv
|
|
# [configure]
|
|
|
|
# [build]
|
|
ninja
|
|
# [build]
|
|
|
|
# [install]
|
|
sudo ninja install
|
|
# [install]
|