15 'gstcontrolbinding.c',
20 'gstdeviceprovider.c',
21 'gstdeviceproviderfactory.c',
22 'gstdynamictypefactory.c',
24 'gstelementfactory.c',
50 'gstregistrychunks.c',
53 'gststreamcollection.c',
68 'gsttypefindfactory.c',
91 'gstcontrolbinding.h',
96 'gstelementmetadata.h',
98 'gstdeviceprovider.h',
99 'gstdeviceproviderfactory.h',
100 'gstdynamictypefactory.h',
101 'gstelementfactory.h',
106 'gstdevicemonitor.h',
120 'gstpluginfeature.h',
127 'gststreamcollection.h',
138 'gsttracerfactory.h',
141 'gsttypefindfactory.h',
149 install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
151 disable_registry = get_option('disable_registry')
152 if not disable_registry
153 gst_registry = ['gstregistrybinary.c']
158 # Make copy so configure_file consumes the copy and we can
159 # still add to the original cdata later.
163 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
165 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#undef GST_DISABLE_GST_DEBUG')
169 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#define GST_DISABLE_REGISTRY 1')
171 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#undef GST_DISABLE_REGISTRY')
174 # FIXME: add --disable-parse option? (but autotools doesn't seem to set this
175 # define properly at all either even though it does expose the option)
176 gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#undef GST_DISABLE_PARSE')
178 # FIXME: add --disable-plugin option?
179 gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
181 configure_file(input : 'gstconfig.h.in',
182 output : 'gstconfig.h',
183 install_dir : 'include/gstreamer-1.0/gst',
184 configuration : gst_cdata)
186 version_cdata = configuration_data()
187 version_cdata.set('GST_VERSION_MAJOR', gst_version_major)
188 version_cdata.set('GST_VERSION_MINOR', gst_version_minor)
189 version_cdata.set('GST_VERSION_MICRO', gst_version_micro)
190 version_cdata.set('GST_VERSION_NANO', gst_version_nano)
192 gst_version_h = configure_file(input : 'gstversion.h.in',
193 output : 'gstversion.h',
194 install_dir : 'include/gstreamer-1.0/gst',
195 configuration : version_cdata)
197 gst_enums = gnome.mkenums('gstenumtypes',
198 sources : gst_headers,
199 h_template : 'gstenumtypes.h.template',
200 c_template : 'gstenumtypes.c.template',
201 install_header : true,
202 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'))
204 gstenum_h = gst_enums[1]
205 gstenum_c = gst_enums[0]
211 libgst_c_args = gst_c_args + [
214 '-DG_LOG_DOMAIN=g_log_domain_gstreamer',
215 '-DGST_DISABLE_DEPRECATED',
218 disable_tracer_hooks = get_option('disable_tracer_hooks')
219 if disable_tracer_hooks
220 libgst_c_args += ['-DGST_DISABLE_GST_TRACER_HOOKS']
223 # Make it possible to build both static and shared versions
224 # at the same time. By default use shared for unit tests etc.
225 # This choice is arbitrary.
226 if libtype != 'shared'
227 libgst_static = static_library('gstreamer-1.0', gst_sources,
228 gstenum_h, gstenum_c, grammar, parser, gst_registry,
229 c_args : [libgst_c_args],
230 include_directories : [configinc,
231 # HACK, change include paths in .y and .l in final version.
232 include_directories('parse')],
234 link_with : printf_lib,
235 dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib] + backtrace_deps + platform_deps,
237 libgst = libgst_static
240 # Make sure that subproject building gir files work
241 gst_incdirs = [configinc]
242 gst_gen_sources = [gstenum_h]
243 if libtype != 'static'
244 libgst_shared = shared_library('gstreamer-1.0', gst_sources,
245 gstenum_h, gstenum_c, grammar, parser, gst_registry,
246 version : libversion,
247 soversion : soversion,
248 c_args : libgst_c_args,
249 include_directories : [configinc,
250 # HACK, change include paths in .y and .l in final version.
251 include_directories('parse')],
252 link_with : printf_lib,
254 dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep] + backtrace_deps
257 libgst = libgst_shared
259 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/gst.h' ]
260 if meson.is_subproject()
261 # FIXME: There must be a better way to do this
262 # Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built)
263 gst_gir_extra_args += ['--cflags-begin',
264 '-I' + meson.current_source_dir() + '/..',
265 '-I' + meson.current_build_dir() + '/..',
269 gst_incdirs += [configinc]
270 gst_gen_sources += [gnome.generate_gir(libgst_shared,
271 sources : gst_sources + gst_headers + gst_enums + [gst_version_h],
273 nsversion : apiversion,
274 identifier_prefix : 'Gst',
275 symbol_prefix : 'gst',
276 export_packages : 'gstreamer-1.0',
277 includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
279 extra_args : gst_gir_extra_args,
284 gst_dep = declare_dependency(link_with : libgst,
285 include_directories : gst_incdirs,
286 dependencies : [glib_dep, gobject_dep, gmodule_dep],
287 # Everything that uses libgst needs this built to compile
288 sources : gst_gen_sources,