2f9aacb25cfd00238ab688a0a5fa885ea7a96c9d
[platform/upstream/gstreamer.git] / gst-libs / gst / video / meson.build
1 video_sources = [
2   'colorbalance.c',
3   'colorbalancechannel.c',
4   'convertframe.c',
5   'gstvideoaffinetransformationmeta.c',
6   'gstvideodecoder.c',
7   'gstvideoencoder.c',
8   'gstvideofilter.c',
9   'gstvideometa.c',
10   'gstvideopool.c',
11   'gstvideosink.c',
12   'gstvideotimecode.c',
13   'gstvideoutils.c',
14   'gstvideoutilsprivate.c',
15   'navigation.c',
16   'video.c',
17   'video-anc.c',
18   'video-blend.c',
19   'video-chroma.c',
20   'video-color.c',
21   'video-converter.c',
22   'video-dither.c',
23   'video-event.c',
24   'video-format.c',
25   'video-frame.c',
26   'video-info.c',
27   'video-multiview.c',
28   'video-resampler.c',
29   'video-scaler.c',
30   'video-tile.c',
31   'video-overlay-composition.c',
32   'videodirection.c',
33   'videoorientation.c',
34   'videooverlay.c',
35 ]
36
37 video_headers = [
38   'colorbalance.h',
39   'colorbalancechannel.h',
40   'gstvideoaffinetransformationmeta.h',
41   'gstvideodecoder.h',
42   'gstvideoencoder.h',
43   'gstvideofilter.h',
44   'gstvideometa.h',
45   'gstvideopool.h',
46   'gstvideosink.h',
47   'gstvideotimecode.h',
48   'gstvideoutils.h',
49   'navigation.h',
50   'video.h',
51   'video-anc.h',
52   'video-event.h',
53   'video-format.h',
54   'video-chroma.h',
55   'video-color.h',
56   'video-converter.h',
57   'video-dither.h',
58   'video-info.h',
59   'video-frame.h',
60   'video-prelude.h',
61   'video-scaler.h',
62   'video-tile.h',
63   'videodirection.h',
64   'videoorientation.h',
65   'videooverlay.h',
66   'video-resampler.h',
67   'video-blend.h',
68   'video-overlay-composition.h',
69   'video-multiview.h',
70 ]
71 install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
72
73 video_mkenum_headers = [
74   'video.h',
75   'video-anc.h',
76   'video-format.h',
77   'video-frame.h',
78   'video-chroma.h',
79   'video-color.h',
80   'video-converter.h',
81   'video-dither.h',
82   'video-info.h',
83   'video-resampler.h',
84   'video-scaler.h',
85   'video-tile.h',
86   'colorbalance.h',
87   'navigation.h',
88 ]
89
90 video_enums = gnome.mkenums_simple('video-enumtypes',
91   sources : video_mkenum_headers,
92   header_prefix : '#include <gst/video/video-prelude.h>',
93   decorator : 'GST_VIDEO_API',
94   install_header: true,
95   install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/video'))
96 gstvideo_c = video_enums[0]
97 gstvideo_h = video_enums[1]
98 video_gen_sources = [gstvideo_h]
99
100 orcsrc = 'video-orc'
101 gstvideo_deps = [gst_base_dep, libm]
102 if have_orcc
103   gstvideo_deps += [orc_dep]
104   orc_h = custom_target(orcsrc + '.h',
105     input : orcsrc + '.orc',
106     output : orcsrc + '.h',
107     command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@'])
108   orc_c = custom_target(orcsrc + '.c',
109     input : orcsrc + '.orc',
110     output : orcsrc + '.c',
111     command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@'])
112 else
113   orc_h = configure_file(input : orcsrc + '-dist.h',
114     output : orcsrc + '.h',
115     configuration : configuration_data())
116   orc_c = configure_file(input : orcsrc + '-dist.c',
117     output : orcsrc + '.c',
118     configuration : configuration_data())
119 endif
120
121 gstvideo = library('gstvideo-@0@'.format(api_version),
122   video_sources, gstvideo_h, gstvideo_c, orc_c, orc_h,
123   c_args : gst_plugins_base_args,
124   include_directories: [configinc, libsinc],
125   version : libversion,
126   soversion : soversion,
127   darwin_versions : osxversion,
128   install : true,
129   dependencies : gstvideo_deps,
130 )
131
132 if build_gir
133   gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ]
134   video_gen_sources += [gnome.generate_gir(gstvideo,
135     sources : video_sources + video_headers + [gstvideo_c] + [gstvideo_h],
136     namespace : 'GstVideo',
137     nsversion : api_version,
138     identifier_prefix : 'Gst',
139     symbol_prefix : 'gst',
140     export_packages : 'gstreamer-video-1.0',
141     includes : ['Gst-1.0', 'GstBase-1.0'],
142     install : true,
143     extra_args : gst_gir_extra_args,
144     dependencies : gstvideo_deps
145   )]
146 endif
147
148 video_dep = declare_dependency(link_with : gstvideo,
149   include_directories : [libsinc],
150   dependencies : gstvideo_deps,
151   sources : video_gen_sources)