Update setup_opencv.sh to work on Fedora Linux

This commit is contained in:
Yuri Pourre 2021-07-28 14:27:45 -03:00 committed by GitHub
parent b899d17f18
commit d2e1702a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,10 +38,18 @@ workspace_file="$( cd "$(dirname "$0")" ; pwd -P )"/WORKSPACE
if [ -z "$1" ] if [ -z "$1" ]
then then
echo "Installing OpenCV from source" echo "Installing OpenCV from source"
if [[ -x "$(command -v apt)" ]]; then
sudo apt update && sudo apt install build-essential git sudo apt update && sudo apt install build-essential git
sudo apt install cmake ffmpeg libavformat-dev libdc1394-22-dev libgtk2.0-dev \ sudo apt install cmake ffmpeg libavformat-dev libdc1394-22-dev libgtk2.0-dev \
libjpeg-dev libpng-dev libswscale-dev libtbb2 libtbb-dev \ libjpeg-dev libpng-dev libswscale-dev libtbb2 libtbb-dev \
libtiff-dev libtiff-dev
elif [[ -x "$(command -v dnf)" ]]; then
sudo dnf update && sudo dnf install cmake gcc gcc-c git
sudo dnf install ffmpeg-devel libdc1394-devel gtk2-devel \
libjpeg-turbo-devel libpng-devel tbb-devel \
libtiff-devel
fi
rm -rf /tmp/build_opencv rm -rf /tmp/build_opencv
mkdir /tmp/build_opencv mkdir /tmp/build_opencv
cd /tmp/build_opencv cd /tmp/build_opencv