summaryrefslogtreecommitdiff
path: root/gst-libs/gst/webrtc/meson.build
blob: 24e43765e41388da4311a7dc20434b90d12a0726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
webrtc_sources = [
  'dtlstransport.c',
  'icetransport.c',
  'rtcsessiondescription.c',
  'rtpreceiver.c',
  'rtpsender.c',
  'rtptransceiver.c',
]

webrtc_headers = [
  'dtlstransport.h',
  'icetransport.h',
  'rtcsessiondescription.h',
  'rtpreceiver.h',
  'rtpsender.h',
  'rtptransceiver.h',
  'webrtc_fwd.h',
  'webrtc.h',
]

webrtc_enumtypes_headers = [
  'dtlstransport.h',
  'icetransport.h',
  'rtptransceiver.h',
  'webrtc_fwd.h',
]

webrtc_enums = gnome.mkenums_simple('webrtc-enumtypes',
  sources : webrtc_enumtypes_headers,
  header_prefix : '#include <gst/webrtc/webrtc_fwd.h>',
  decorator: 'GST_WEBRTC_API',
  install_header: true,
  install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/webrtc/'))

gstwebrtc_c = webrtc_enums[0]
gstwebrtc_h = webrtc_enums[1]

webrtc_gen_sources = [gstwebrtc_h]

gstwebrtc_dependencies = [gstbase_dep, gstsdp_dep]

gstwebrtc = library('gstwebrtc-' + api_version,
  webrtc_sources, gstwebrtc_c, gstwebrtc_h,
  c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
  include_directories : [configinc, libsinc],
  version : libversion,
  soversion : soversion,
  darwin_versions : osxversion,
  install : true,
  dependencies : gstwebrtc_dependencies,
)

if build_gir
  webrtc_gir = gnome.generate_gir(gstwebrtc,
    sources : webrtc_sources + webrtc_headers + [gstwebrtc_h],
    namespace : 'GstWebRTC',
    nsversion : api_version,
    identifier_prefix : 'Gst',
    symbol_prefix : 'gst',
    export_packages : 'gstreamer-webrtc-1.0',
    includes : ['Gst-1.0', 'GstSdp-1.0'],
    install : true,
    extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/webrtc/webrtc.h'],
    dependencies : [gstbase_dep, gstsdp_dep]
  )
  webrtc_gen_sources += webrtc_gir
endif

install_headers(webrtc_headers, subdir : 'gstreamer-1.0/gst/webrtc')

gstwebrtc_dep = declare_dependency(link_with: gstwebrtc,
  include_directories : libsinc,
  sources: webrtc_gen_sources,
  dependencies: gstwebrtc_dependencies)