gstreamer/subprojects/gst-plugins-bad/gst-libs/gst/interfaces/meson.build
Thibault Saunier 6e79932ad9 meson: List libraries and their corresponding gir definition
Introduces a `libraries` variable that contains all libraries in a
list with the following format:

``` meson
libraries = [
    [pkg_name, {
        'lib': library_object
        'gir': [ {full gir definition in a dict } ]
    ],
    ....
]
```

It therefore refactors the way we build the gir so that we can reuse the
same information to build them against 'gstreamer-full' in gst-build
when linking statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00

42 lines
1.5 KiB
Meson

photography_sources = ['photography.c']
photo_headers = ['photography.h', 'photography-prelude.h']
install_headers(photo_headers, subdir : 'gstreamer-1.0/gst/interfaces')
photo_enums = gnome.mkenums_simple('photography-enumtypes',
sources : photo_headers,
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
header_prefix : '#include <gst/interfaces/photography-prelude.h>',
decorator: 'GST_PHOTOGRAPHY_API',
install_header: true,
install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/interfaces'))
photoenum_c = photo_enums[0]
photoenum_h = photo_enums[1]
pkg_name = 'gstreamer-photography-1.0'
gstphotography = library('gstphotography-' + api_version,
photography_sources, photoenum_h, photoenum_c,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_PHOTOGRAPHY'],
include_directories : [configinc, libsinc],
version : libversion,
soversion : soversion,
darwin_versions : osxversion,
install : true,
dependencies : [gst_dep],
)
pkgconfig.generate(gstphotography,
libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs,
name : pkg_name,
description : 'High level API for transcoding using GStreamer',
)
gstphotography_dep = declare_dependency(link_with : gstphotography,
include_directories : [libsinc],
dependencies : [gst_dep],
sources : [photoenum_h])
libraries += [[pkg_name, {'lib': gstphotography}]]
meson.override_dependency(pkg_name, gstphotography_dep)