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