Meson build plugins / link with static lib

Nicolas Dufresne nicolas at ndufresne.ca
Fri Jan 24 01:56:45 UTC 2020


Le jeudi 23 janvier 2020 à 16:07 -0800, Frederic Turmel a écrit :
> Hi, i'm trying to use external static library to my plugin using
> meson. I know this is not directly a gstreamer question but perhaps
> there is a simple answer
> 
> The external lib is in C  and configinc has all the lib path
> using include_directories function.
> 
> I tried the following command but the linker still complain. 
> my_lib = static_library('XXXXX_capture')
> 
> my_dep = declare_dependency(link_with : my_lib, include_directories :
> configinc)
> 
> Is there an example in the repo? I search but all I could find in
> external dependency that gets build as subproject.

Prior to meson, we'd use autotools which would use libtools for static
linking. For each .a there would be .la file that describe the link
dependencies. With meson, libtool is no longer used, you need a
<mylib>.pc file (pkg-config) with a Libs.private section.

You can of course pass all the deps manually, but if you are looking
for examples of what parameter being pass, you'll have to look inside
these .pc files. Note that not all projects have Libs.private or a
proper implementation of it yet. 

> 
> Thanks
> FredT
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list