meson: Check both opencv4 and opencv dependencies.

OpenCV changed its pkg-config file name from opencv.pc to opencv4.pc in
its latest version apparently.

Fixes #31.
This commit is contained in:
Emmanuel Gil Peyrot 2019-09-29 13:22:03 +02:00 committed by Jakob Bornecrantz
parent cbee61a008
commit 9aea9aa6d1

View file

@ -38,13 +38,17 @@ avcodec = dependency('libavcodec', required: false)
eigen3 = dependency('eigen3')
libjpeg = dependency('libjpeg', required: false)
libusb = dependency('libusb-1.0', required: false)
opencv = dependency('opencv', required: get_option('tracking'))
opengl = dependency('gl')
sdl2 = dependency('sdl2', required: get_option('gui'))
udev = dependency('libudev', required: false)
libuvc = dependency('libuvc', required: false)
vulkan = dependency('vulkan')
opencv = dependency('opencv4', required: false)
if not opencv.found()
opencv = dependency('opencv', required: get_option('tracking'))
endif
doxygen = find_program('doxygen', required: get_option('docs'))
pthreads = cc.find_library('pthread', required: true)