Bug 416345

Summary: Proper opencv minimum version must be specified
Product: [Applications] digikam Reporter: Vitalii Tymchyshyn <vit>
Component: Portability-CmakeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 7.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 7.0.0
Sentry Crash Report:

Description Vitalii Tymchyshyn 2020-01-16 17:05:24 UTC
SUMMARY

cmake still asks for  libopencv (version >= 3.1.0) even though version with dnn (3.3) is required. Very confusing when building in ubuntu 18.04 (has 3.2). Could you please specify proper minimum version.

STEPS TO REPRODUCE
1. Clone. Tested on
commit 537345be7223394c47c7b41629b2997f706e3bd3 (HEAD -> master, origin/master, origin/HEAD)
Author: Maik Qualmann <metzpinguin@gmail.com>
Date:   Wed Jan 15 22:47:20 2020 +0100

    try to fix crash under OSX
    CCBUGS: 416289

2. Run "cmake ."

OBSERVED RESULT

-- Could NOT find OpenCV (missing: dnn) (found version "3.2.0")
CMake Warning at core/cmake/modules/MacroOpenCV.cmake:22 (find_package):
  Found package configuration file:

    /usr/share/OpenCV/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
  NOT FOUND.
Call Stack (most recent call first):
  core/CMakeLists.txt:306 (DETECT_OPENCV)
...
--  libopencv found.......................... NO
CMake Error at core/cmake/modules/MacroUtils.cmake:47 (message):
   libopencv is needed. You need to install the libopencv (version >= 3.1.0) development package.
Call Stack (most recent call first):
  core/CMakeLists.txt:597 (PRINT_LIBRARY_STATUS)


EXPECTED RESULT

It should say 3.3 is required

SOFTWARE/OS VERSIONS

Ubuntu 18.04.3 LTS
libopencv-dev 3.2.0+dfsg-4ubuntu0.1
Comment 1 caulier.gilles 2020-01-17 05:28:31 UTC
Git commit 5ffcae391337ba93b7714015d9c5eb0aa362d6cc by Gilles Caulier.
Committed on 17/01/2020 at 05:26.
Pushed by cgilles into branch 'master'.

check for opencv 3.3 as minimal version as DNN module was introduced with this release
FIXED_IN: 7.0.0

M  +1    -1    Mainpage.dox
M  +2    -1    NEWS
M  +3    -3    core/CMakeLists.txt
M  +2    -2    core/cmake/modules/MacroOpenCV.cmake

https://invent.kde.org/kde/digikam/commit/5ffcae391337ba93b7714015d9c5eb0aa362d6cc