meson: List libraries and their corresponding gir definition
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-base / gst-libs / gst / video / meson.build
1 video_sources = files([
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 = files([
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-anc.h',
81   'video-format.h',
82   'video-frame.h',
83   'video-chroma.h',
84   'video-color.h',
85   'video-converter.h',
86   'video-dither.h',
87   'video-info.h',
88   'video-overlay-composition.h',
89   'video-resampler.h',
90   'video-scaler.h',
91   'video-tile.h',
92   'gstvideometa.h',
93   'gstvideotimecode.h',
94   'gstvideoutils.h',
95   'gstvideoencoder.h',
96   'gstvideodecoder.h',
97   'colorbalance.h',
98   'navigation.h',
99 ]
100
101 video_enums = gnome.mkenums_simple('video-enumtypes',
102   sources : video_mkenum_headers,
103   body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
104   header_prefix : '#include <gst/video/video-prelude.h>',
105   decorator : 'GST_VIDEO_API',
106   install_header: true,
107   install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/video'))
108 gstvideo_c = video_enums[0]
109 gstvideo_h = video_enums[1]
110 video_gen_sources = [gstvideo_h]
111
112 orcsrc = 'video-orc'
113 gstvideo_deps = [gst_base_dep, libm]
114 if have_orcc
115   gstvideo_deps += [orc_dep]
116   orc_h = custom_target(orcsrc + '.h',
117     input : orcsrc + '.orc',
118     output : orcsrc + '.h',
119     command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@'])
120   orc_c = custom_target(orcsrc + '.c',
121     input : orcsrc + '.orc',
122     output : orcsrc + '.c',
123     command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@'])
124   orc_targets += {'name': orcsrc, 'orc-source': files(orcsrc + '.orc'), 'header': orc_h, 'source': orc_c}
125 else
126   orc_h = configure_file(input : orcsrc + '-dist.h',
127     output : orcsrc + '.h',
128     copy : true)
129   orc_c = configure_file(input : orcsrc + '-dist.c',
130     output : orcsrc + '.c',
131     copy : true)
132 endif
133
134 gstvideo = library('gstvideo-@0@'.format(api_version),
135   video_sources, gstvideo_h, gstvideo_c, orc_c, orc_h,
136   c_args : gst_plugins_base_args + ['-DBUILDING_GST_VIDEO'],
137   include_directories: [configinc, libsinc],
138   version : libversion,
139   soversion : soversion,
140   darwin_versions : osxversion,
141   install : true,
142   dependencies : gstvideo_deps,
143 )
144
145 library_def = {'lib': gstvideo}
146 pkg_name = 'gstreamer-video-1.0'
147 pkgconfig.generate(gstvideo,
148   libraries : [gst_dep, gst_base_dep],
149   variables : pkgconfig_variables,
150   subdirs : pkgconfig_subdirs,
151   name : pkg_name,
152   description : 'Video base classes and helper functions',
153 )
154
155 if build_gir
156   gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ]
157   gir = {
158     'sources' : video_sources + video_headers + [gstvideo_c] + [gstvideo_h],
159     'namespace' : 'GstVideo',
160     'nsversion' : api_version,
161     'identifier_prefix' : 'Gst',
162     'symbol_prefix' : 'gst',
163     'export_packages' : pkg_name,
164     'includes' : ['Gst-1.0','GstBase-1.0'],
165     'install' : true,
166     'extra_args' : gst_gir_extra_args,
167     'dependencies' : gstvideo_deps
168   }
169   library_def += {'gir': [gir]}
170   if not static_build
171     video_gir = gnome.generate_gir(gstvideo, kwargs: gir)
172     video_gen_sources += [video_gir]
173   endif
174 endif
175 libraries += [[pkg_name, library_def]]
176
177 video_dep = declare_dependency(link_with : gstvideo,
178   include_directories : [libsinc],
179   dependencies : gstvideo_deps,
180   sources : video_gen_sources)
181
182 meson.override_dependency(pkg_name, video_dep)