gst-inference icon indicating copy to clipboard operation
gst-inference copied to clipboard

Meson not detection OpenCV4 installation

Open michaelgruner opened this issue 5 years ago • 1 comments

In my Mac OSX:

meson --version
0.53.0

pkg-config --modversion opencv4
4.3.0

I get the following:

...
Found CMake: /usr/local/bin/cmake (3.17.2)
Run-time dependency opencv found: NO (tried pkgconfig and framework)
Run-time dependency opencv found: NO (tried pkgconfig and framework)
Dependency opencv4 found: NO found 4.3.0 but need: '< 4.3.0' ; matched: '>= 4.0.0'
Run-time dependency opencv4 found: NO (tried pkgconfig, framework and cmake)
Compiler for C supports arguments -Werror: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wredundant-decls: YES
...

gst-libs/gst/opencv/meson.build:28: WARNING: OpenCV was not found in this system. Base overlay utils will not be built.
ext/opencv/meson.build:23: WARNING: OpenCV not found in this system. Overlay plug-ins will not be built.

michaelgruner avatar May 30 '20 03:05 michaelgruner

Why are these limits as these? These cannot be like these

opencv_dep = dependency('opencv', version : ['>= 2.3.1', '< 2.4.13'], required : false)
if opencv_dep.found()
  cdata.set('OCV_VERSION_LT_3_2', 1)
endif

if not opencv_dep.found()
  opencv_dep = dependency('opencv', version : ['>= 3.2.0', '< 3.5.0'], required : false)

  if not opencv_dep.found()
    opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.3.0'], required : false)
    if opencv_dep.found()
        cdata.set('OCV_VERSION_4_0', 1)
    endif
  endif
endif

It doesn't even cover the full range of versions...

michaelgruner avatar May 30 '20 18:05 michaelgruner