Meson build plugins / link with static lib
Frederic Turmel
fturmel at netflix.com
Fri Jan 24 02:56:28 UTC 2020
Thanks. I actually figured it out.
cmplr = meson.get_compiler('c')
then use x = cmplr.find_library( 'xyz', dirs: 'pathtofile')
library('plugin name',
dependencies: [x]
....)
On Thu, Jan 23, 2020 at 5:56 PM Nicolas Dufresne <nicolas at ndufresne.ca>
wrote:
> 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
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200123/c179e8cb/attachment.htm>
More information about the gstreamer-devel
mailing list