Move dataurisrc element from -bad
[platform/upstream/gstreamer.git] / gst / meson.build
1 gst_sources = [
2   'gst.c',
3   'gstobject.c',
4   'gstallocator.c',
5   'gstbin.c',
6   'gstbuffer.c',
7   'gstbufferlist.c',
8   'gstbufferpool.c',
9   'gstbus.c',
10   'gstcaps.c',
11   'gstcapsfeatures.c',
12   'gstchildproxy.c',
13   'gstclock.c',
14   'gstclock-linreg.c',
15   'gstcontext.c',
16   'gstcontrolbinding.c',
17   'gstcontrolsource.c',
18   'gstdatetime.c',
19   'gstdebugutils.c',
20   'gstdevice.c',
21   'gstdeviceprovider.c',
22   'gstdeviceproviderfactory.c',
23   'gstdynamictypefactory.c',
24   'gstelement.c',
25   'gstelementfactory.c',
26   'gsterror.c',
27   'gstevent.c',
28   'gstformat.c',
29   'gstghostpad.c',
30   'gstdevicemonitor.c',
31   'gstinfo.c',
32   'gstiterator.c',
33   'gstatomicqueue.c',
34   'gstmessage.c',
35   'gstmeta.c',
36   'gstmemory.c',
37   'gstminiobject.c',
38   'gstpad.c',
39   'gstpadtemplate.c',
40   'gstparamspecs.c',
41   'gstpipeline.c',
42   'gstplugin.c',
43   'gstpluginfeature.c',
44   'gstpluginloader.c',
45   'gstpoll.c',
46   'gstpreset.c',
47   'gstprotection.c',
48   'gstquark.c',
49   'gstquery.c',
50   'gstregistry.c',
51   'gstregistrychunks.c',
52   'gstsample.c',
53   'gstsegment.c',
54   'gststreamcollection.c',
55   'gststreams.c',
56   'gststructure.c',
57   'gstsystemclock.c',
58   'gsttaglist.c',
59   'gsttagsetter.c',
60   'gsttask.c',
61   'gsttaskpool.c',
62   'gsttoc.c',
63   'gsttocsetter.c',
64   'gsttracer.c',
65   'gsttracerfactory.c',
66   'gsttracerrecord.c',
67   'gsttracerutils.c',
68   'gsttypefind.c',
69   'gsttypefindfactory.c',
70   'gsturi.c',
71   'gstutils.c',
72   'gstvalue.c',
73   'gstparse.c',
74 ]
75
76 gst_headers = [
77   'gst.h',
78   'glib-compat.h',
79   'gstobject.h',
80   'gstallocator.h',
81   'gstbin.h',
82   'gstbuffer.h',
83   'gstbufferlist.h',
84   'gstbufferpool.h',
85   'gstbus.h',
86   'gstcaps.h',
87   'gstcapsfeatures.h',
88   'gstchildproxy.h',
89   'gstclock.h',
90   'gstcompat.h',
91   'gstcontext.h',
92   'gstcontrolbinding.h',
93   'gstcontrolsource.h',
94   'gstdatetime.h',
95   'gstdebugutils.h',
96   'gstelement.h',
97   'gstelementmetadata.h',
98   'gstdevice.h',
99   'gstdeviceprovider.h',
100   'gstdeviceproviderfactory.h',
101   'gstdynamictypefactory.h',
102   'gstelementfactory.h',
103   'gsterror.h',
104   'gstevent.h',
105   'gstformat.h',
106   'gstghostpad.h',
107   'gstdevicemonitor.h',
108   'gstinfo.h',
109   'gstiterator.h',
110   'gstatomicqueue.h',
111   'gstmacros.h',
112   'gstmessage.h',
113   'gstmeta.h',
114   'gstmemory.h',
115   'gstminiobject.h',
116   'gstpad.h',
117   'gstpadtemplate.h',
118   'gstparamspecs.h',
119   'gstpipeline.h',
120   'gstplugin.h',
121   'gstpluginfeature.h',
122   'gstpoll.h',
123   'gstpreset.h',
124   'gstprotection.h',
125   'gstquery.h',
126   'gstsample.h',
127   'gstsegment.h',
128   'gststreamcollection.h',
129   'gststreams.h',
130   'gststructure.h',
131   'gstsystemclock.h',
132   'gsttaglist.h',
133   'gsttagsetter.h',
134   'gsttask.h',
135   'gsttaskpool.h',
136   'gsttoc.h',
137   'gsttocsetter.h',
138   'gsttracer.h',
139   'gsttracerfactory.h',
140   'gsttracerrecord.h',
141   'gsttypefind.h',
142   'gsttypefindfactory.h',
143   'gsturi.h',
144   'gstutils.h',
145   'gstvalue.h',
146   'gstregistry.h',
147   'gstparse.h',
148   'math-compat.h',
149 ]
150 install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
151
152 if not get_option('disable_registry')
153   gst_registry = ['gstregistrybinary.c']
154 else
155   gst_registry = []
156 endif
157
158 configure_file(input : 'gstconfig.h.in',
159   output : 'gstconfig.h',
160   install_dir : 'include/gstreamer-1.0/gst',
161   configuration : cdata)
162 configure_file(input : 'gstversion.h.in',
163   output : 'gstversion.h',
164   install_dir : 'include/gstreamer-1.0/gst',
165   configuration : cdata)
166
167 mkenums = find_program('build_mkenum.py')
168 glib_mkenums = find_program('glib-mkenums')
169
170 gstenum_h = custom_target('gstenum_h',
171   output : 'gstenumtypes.h',
172   input : gst_headers,
173   install : true,
174   install_dir : 'include/gstreamer-1.0/gst',
175   command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
176
177 gstenum_c = custom_target('gstenum_c',
178   output : 'gstenumtypes.c',
179   input : gst_headers,
180   depends : [gstenum_h],
181   command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
182
183 subdir('parse')
184 subdir('printf')
185
186 libgst_c_args = gst_c_args + [
187   '-D_GNU_SOURCE',
188   '-DGST_EXPORTS',
189   '-DG_LOG_DOMAIN=g_log_domain_gstreamer',
190   '-DGST_DISABLE_DEPRECATED',
191 ]
192
193 # Make it possible to build both static and shared versions
194 # at the same time. By default use shared for unit tests etc.
195 # This choice is arbitrary.
196 if libtype != 'shared'
197   libgst_static = static_library('gstreamer-1.0', gst_sources,
198     gstenum_h, gstenum_c, grammar, parser, gst_registry,
199     c_args : [libgst_c_args],
200     include_directories : [configinc,
201       # HACK, change include paths in .y and .l in final version.
202       include_directories('parse')],
203     install : true,
204     link_with : printf_lib,
205     dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, unwind_dep, dw_dep] + platform_deps,
206   )
207   libgst = libgst_static
208 endif
209
210 # Make sure that subproject building gir files work
211 gst_incdirs = [configinc]
212 gst_gen_sources = [gstenum_h]
213 if libtype != 'static'
214   libgst_shared = shared_library('gstreamer-1.0', gst_sources,
215     gstenum_h, gstenum_c, grammar, parser, gst_registry,
216     version : libversion,
217     soversion : soversion,
218     c_args : libgst_c_args,
219     include_directories : [configinc,
220       # HACK, change include paths in .y and .l in final version.
221       include_directories('parse')],
222     link_with : printf_lib,
223     install : true,
224     dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, unwind_dep, dw_dep] + platform_deps,
225     vs_module_defs: vs_module_defs_dir + 'libgstreamer.def',
226   )
227   libgst = libgst_shared
228   if build_gir
229     gst_gir_extra_args = gir_init_section + [ '--c-include=gst/gst.h' ]
230     if meson.is_subproject()
231       # FIXME: There must be a better way to do this
232       # Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built)
233       gst_gir_extra_args += ['--cflags-begin',
234           '-I' + meson.current_source_dir() + '/..',
235           '-I' + meson.current_build_dir() + '/..',
236           '--cflags-end']
237     endif
238
239     gst_incdirs += [include_directories(meson.current_build_dir() + '/..')]
240     gst_gen_sources += [gnome.generate_gir(libgst_shared,
241       sources : gst_sources + gst_headers,
242       namespace : 'Gst',
243       nsversion : apiversion,
244       identifier_prefix : 'Gst',
245       symbol_prefix : 'gst',
246       export_packages : 'gstreamer-1.0',
247       includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
248       install : true,
249       extra_args : gst_gir_extra_args,
250     )]
251   endif
252 endif
253
254 gst_dep = declare_dependency(link_with : libgst,
255   include_directories : gst_incdirs,
256   dependencies : [glib_dep, gobject_dep, gmodule_dep],
257   # Everything that uses libgst needs this built to compile
258   sources : gst_gen_sources,
259 )