3632adceb91feb98508451f063c62c9037723de7
[platform/upstream/gstreamer.git] / gst-libs / gst / rtsp / meson.build
1 rtsp_sources = [
2   'gstrtsptransport.c',
3   'gstrtspurl.c',
4   'gstrtspmessage.c',
5   'gstrtspconnection.c',
6   'gstrtspdefs.c',
7   'gstrtspextension.c',
8   'gstrtsprange.c'
9   ]
10
11 rtsp_headers = [
12   'gstrtspconnection.h',
13   'gstrtspdefs.h',
14   'gstrtspextension.h',
15   'gstrtsp.h',
16   'gstrtspmessage.h',
17   'gstrtsprange.h',
18   'gstrtsptransport.h',
19   'gstrtspurl.h',
20   'rtsp-prelude.h',
21   'rtsp.h',
22 ]
23 install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
24
25 rtsp_enums = gnome.mkenums_simple('gstrtsp-enumtypes',
26   sources : rtsp_headers,
27   body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
28   header_prefix : '#include <gst/rtsp/rtsp-prelude.h>',
29   decorator : 'GST_RTSP_API',
30   install_header: true,
31   install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/rtsp'))
32 gstrtsp_c = rtsp_enums[0]
33 gstrtsp_h = rtsp_enums[1]
34
35 if host_system == 'windows'
36   winsock2 = cc.find_library('ws2_32')
37 else
38   winsock2 = []
39 endif
40 gstrtsp_deps = [gst_base_dep, gst_dep, gio_dep, libm, winsock2]
41
42 gst_rtsp = library('gstrtsp-@0@'.format(api_version),
43   rtsp_sources,
44   gstrtsp_h, gstrtsp_c,
45   c_args : gst_plugins_base_args + ['-DBUILDING_GST_RTSP'],
46   include_directories: [configinc, libsinc],
47   version : libversion,
48   soversion : soversion,
49   darwin_versions : osxversion,
50   install : true,
51   dependencies : gstrtsp_deps,
52 )
53
54 rtsp_gen_sources = [gstrtsp_h]
55 if build_gir
56   gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ]
57   rtsp_gir = gnome.generate_gir(gst_rtsp,
58     sources : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h],
59     namespace : 'GstRtsp',
60     nsversion : api_version,
61     identifier_prefix : 'Gst',
62     symbol_prefix : 'gst',
63     export_packages : 'gstreamer-rtsp-1.0',
64     includes : ['Gst-1.0', 'GstBase-1.0', 'GstSdp-1.0', 'Gio-2.0'],
65     install : true,
66     extra_args : gst_gir_extra_args,
67     dependencies : gstrtsp_deps + [sdp_dep]
68   )
69   rtsp_gen_sources += [rtsp_gir]
70 endif
71
72 rtsp_dep = declare_dependency(link_with : gst_rtsp,
73   include_directories : [libsinc],
74   dependencies : gstrtsp_deps,
75   sources : rtsp_gen_sources)