opencv/samples/install/linux_install_a.sh

59 lines
764 B
Bash
Raw Normal View History

#!/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]
2021-12-22 21:01:26 +08:00
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
unzip opencv.zip
2021-12-22 21:01:26 +08:00
mv opencv-4.x 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]