Home:ALL Converter>What is the proper way of adding a local dependency (openCV) in Meson?

What is the proper way of adding a local dependency (openCV) in Meson?

Ask Time:2020-05-28T00:02:45         Author:dvilela

Json Formatter

I am using OpenCV in one of my projects. Until now, I was using version 3 under Ubuntu 18.04, so in my meson.build I had:

... dependencies: [dependency('opencv')])

Now, I've compiled OpenCV 4 from source and installed to the default dir, /usr/local/, and changed my meson.build to:

... dependencies: [dependency('opencv4')])

Resulting in a not found error (despite this works with Ubuntu 20.04 and the package from the official repos, which is version 4.2). How should I specify the library's location so Meson can find it?

I've seen find_library, but that's deprecated according the docs.

Author:dvilela,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/62047591/what-is-the-proper-way-of-adding-a-local-dependency-opencv-in-meson
yy