How to give releative path for dirs option in meson build to find the thrid party library?

Viewed 1369

I am trying to build custom gst-plugin which has third party library dependency.

With cc.find_library and dirs option (takes absolute path) I am able to build the setup.

But I want to include the relative paths, so that when others uses my package they don't have to change anything, just run the meson build. Is there any way to do the same: to add/include relative to search library in directories?

1 Answers

find_library() does indeed require an absolute path. There is no way around that. You can use internal meson functionality to still succeed though:

cc.find_library('foo', dirs : meson.current_source_dir() + '/lib')

Related