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