libs: fix API export/import and 'inconsistent linkage' on MSVC
[platform/upstream/gstreamer.git] / gst-libs / gst / rtp / meson.build
1 rtp_sources = [
2   'gstrtpbuffer.c',
3   'gstrtcpbuffer.c',
4   'gstrtppayloads.c',
5   'gstrtphdrext.c',
6   'gstrtpbaseaudiopayload.c',
7   'gstrtpbasepayload.c',
8   'gstrtpbasedepayload.c'
9   ]
10
11 rtp_headers = [
12   'gstrtcpbuffer.h',
13   'gstrtpbaseaudiopayload.h',
14   'gstrtpbasedepayload.h',
15   'gstrtpbasepayload.h',
16   'gstrtpbuffer.h',
17   'gstrtpdefs.h',
18   'gstrtphdrext.h',
19   'gstrtppayloads.h',
20   'rtp-prelude.h',
21   'rtp.h',
22 ]
23 install_headers(rtp_headers, subdir : 'gstreamer-1.0/gst/rtp/')
24
25 rtp_enums = gnome.mkenums_simple('gstrtp-enumtypes',
26   sources : rtp_headers,
27   body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
28   header_prefix : '#include <gst/rtp/rtp-prelude.h>',
29   decorator : 'GST_RTP_API',
30   install_header: true,
31   install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/rtp'))
32 gstrtp_enum_c = rtp_enums[0]
33 gstrtp_enum_h = rtp_enums[1]
34
35 gstrtp_deps = [audio_dep, gst_base_dep]
36 gst_rtp = library('gstrtp-@0@'.format(api_version),
37   rtp_sources, gstrtp_enum_c, gstrtp_enum_h,
38   c_args : gst_plugins_base_args + ['-DBUILDING_GST_RTP'],
39   include_directories: [configinc, libsinc],
40   version : libversion,
41   soversion : soversion,
42   darwin_versions : osxversion,
43   install : true,
44   dependencies : gstrtp_deps,
45 )
46
47 rtp_gen_sources = [gstrtp_enum_h]
48 if build_gir
49   gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ]
50   rtp_gen_sources += [gnome.generate_gir(gst_rtp,
51     sources : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h],
52     namespace : 'GstRtp',
53     nsversion : api_version,
54     identifier_prefix : 'Gst',
55     symbol_prefix : 'gst',
56     export_packages : 'gstreamer-rtp-1.0',
57     includes : ['Gst-1.0', 'GstBase-1.0'],
58     install : true,
59     extra_args : gst_gir_extra_args,
60     dependencies : gstrtp_deps
61   )]
62 endif
63
64
65 rtp_dep = declare_dependency(link_with : gst_rtp,
66   include_directories : [libsinc],
67   dependencies : gstrtp_deps,
68   sources : rtp_gen_sources)