Meson: Use pkg-config generator
[platform/upstream/gstreamer.git] / gst-libs / gst / app / meson.build
1 app_sources = ['gstappsrc.c', 'gstappsink.c']
2
3 app_mkenum_headers = [
4   'gstappsrc.h',
5 ]
6
7 app_headers = app_mkenum_headers + [ 'app.h', 'app-prelude.h', 'gstappsink.h' ]
8 install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
9
10 app_enums = gnome.mkenums_simple('app-enumtypes',
11   sources : app_mkenum_headers,
12   body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
13   header_prefix : '#include <gst/app/app-prelude.h>',
14   decorator : 'GST_APP_API',
15   install_header: true,
16   install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/app'))
17 gstapp_c = app_enums[0]
18 gstapp_h = app_enums[1]
19
20 app_gen_sources = [gstapp_h]
21
22 gstapp = library('gstapp-@0@'.format(api_version),
23   app_sources, gstapp_h, gstapp_c,
24   c_args : gst_plugins_base_args + ['-DBUILDING_GST_APP'],
25   include_directories: [configinc, libsinc],
26   version : libversion,
27   soversion : soversion,
28   darwin_versions : osxversion,
29   install : true,
30   dependencies : [gst_base_dep],
31 )
32
33 pkgconfig.generate(gstapp,
34   libraries : [gst_dep, gst_base_dep],
35   variables : pkgconfig_variables,
36   subdirs : pkgconfig_subdirs,
37   name : 'gstreamer-app-1.0',
38   description : 'Helper functions and base classes for application integration',
39 )
40
41 if build_gir
42   gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ]
43   app_gir = gnome.generate_gir(gstapp,
44     sources : app_sources + app_headers + [gstapp_c] + [gstapp_h],
45     namespace : 'GstApp',
46     nsversion : api_version,
47     identifier_prefix : 'Gst',
48     symbol_prefix : 'gst',
49     export_packages : 'gstreamer-app-1.0',
50     includes : ['Gst-1.0', 'GstBase-1.0'],
51     install : true,
52     extra_args : gst_gir_extra_args,
53     dependencies : [gst_dep, gst_base_dep]
54   )
55
56   app_gen_sources += app_gir
57 endif
58
59 app_dep = declare_dependency(link_with: gstapp,
60   include_directories : [libsinc],
61   dependencies : [gst_base_dep],
62   sources : app_gen_sources)
63
64 meson.override_dependency('gstreamer-app-1.0', app_dep)