Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 753
saleem Avatar asked Nov 06 '17 10:11

saleem


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')

like image 163
Florian Zwoch Avatar answered Oct 15 '22 22:10

Florian Zwoch