Skip to content

Compiling qimgv from source

easymodo edited this page Sep 23, 2021 · 6 revisions

This will walk you through compiling a standard qimgv package under linux (with opencv, exiv2 and mpv enabled)

1. Install dependencies

We need to have this:

gcc >= 9.0, git, cmake >= 3.13, qt >= 5.14, exiv2, mpv, opencv (core and imgproc)

Below is an example for Ubuntu & Fedora. Other distros may have slightly different package names.

Ubuntu & derivatives (21.04 or later)

sudo apt install build-essential git cmake qtbase5-dev libqt5svg5-dev libexiv2-dev libmpv-dev libopencv-dev kimageformat-plugins gcc g++

Optional: libkf5windowsystem-dev for blur support under kde

Fedora

Enable RPMFusion https://rpmfusion.org/Configuration.

It is needed for video playback (mpv), but you also can build without it. See CMake build options at the end.

sudo dnf install git cmake make qt5 qt5-devel gcc-c++ mpv mpv-libs-devel exiv2-devel opencv opencv-devel

Optional: kf5-kwindowsystem - for blur support under kde

2. Get qimgv sources

git clone https://github.com/easymodo/qimgv.git
cd qimgv && mkdir -p build && cd build

3. Configure & compile & install

cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_INSTALL_LIBDIR=lib

Note: for kde blur support add -DKDE_SUPPORT=ON at the end ^

make -j`nproc --ignore=1`
sudo make install

That's it!

Possible build issues

  • If you get errors like "/usr/lib64 exists in filesystem" during install:

add -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib to cmake command.

CMake build options

Option Default value Description
VIDEO_SUPPORT ON Enables video playback via mpv
EXIV2 ON Support reading exif tags via exiv2
OPENCV_SUPPORT ON Enables high quality scaling options
KDE_SUPPORT OFF Use some features from KDE, like background blur

Usage example:

cmake ../ -DKDE_SUPPORT=ON  -DCMAKE_INSTALL_PREFIX=/usr/
Clone this wiki locally