-gst_sources = [
+gst_sources = files(
'gst.c',
'gstobject.c',
'gstallocator.c',
'gstutils.c',
'gstvalue.c',
'gstparse.c',
-]
+)
-gst_headers = [
+gst_headers = files(
'gst.h',
'glib-compat.h',
'gstobject.h',
'gstregistry.h',
'gstparse.h',
'math-compat.h',
-]
+)
+if host_system == 'darwin'
+ gst_headers += 'gstmacos.h'
+ gst_sources += 'gstmacos.m'
+endif
+
install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
+extra_deps = []
+if host_system == 'android'
+ gst_sources += 'gstandroid.c'
+ extra_deps += cc.find_library('log')
+endif
+
+if host_system == 'darwin'
+ extra_deps += dependency('appleframeworks', modules : ['Cocoa'])
+endif
+
gst_registry = get_option('registry')
if gst_registry
- gst_registry_sources = ['gstregistrybinary.c']
+ gst_registry_sources = files('gstregistrybinary.c')
else
gst_registry_sources = []
endif
libgst_c_args = gst_c_args + [
'-D_GNU_SOURCE',
- '-DG_LOG_DOMAIN=g_log_domain_gstreamer',
+ '-DG_LOG_DOMAIN="GStreamer"',
'-DGST_DISABLE_DEPRECATED',
]
gst_gen_sources = [gstenum_h]
libgst = library('gstreamer-1.0', gst_sources,
gstenum_h, gstenum_c, gst_parse_sources, gst_registry_sources,
- objects : printf_lib.extract_all_objects(),
version : libversion,
soversion : soversion,
darwin_versions : osxversion,
include_directories : [configinc,
# HACK, change include paths in .y and .l in final version.
include_directories('parse')],
+ link_with : printf_lib,
install : true,
- dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep] + backtrace_deps
- + platform_deps,
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep,
+ backtrace_deps, platform_deps, extra_deps],
)
+pkg_name = 'gstreamer-1.0'
+library_def = {'lib': libgst}
pkgconfig.generate(libgst,
- libraries : [glib_dep, gobject_dep],
+ libraries : [glib_dep, gobject_dep] + pkgconfig_libs,
variables : pkgconfig_variables,
uninstalled_variables: pkgconfig_uninstalled_variables,
subdirs : pkgconfig_subdirs,
- name : 'gstreamer-1.0',
+ name : pkg_name,
description : 'Streaming media framework',
)
endif
gst_incdirs += [configinc]
- gst_gir = gnome.generate_gir(libgst,
- sources : gst_sources + gst_headers + gst_enums + [gst_version_h],
- namespace : 'Gst',
- nsversion : apiversion,
- identifier_prefix : 'Gst',
- symbol_prefix : 'gst',
- export_packages : 'gstreamer-1.0',
- includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
- install : true,
- extra_args : gst_gir_extra_args,
- )
- gst_gen_sources += gst_gir
+ gir = {
+ 'sources' : gst_sources + gst_headers + gst_enums + [gst_version_h],
+ 'namespace' : 'Gst',
+ 'nsversion' : apiversion,
+ 'identifier_prefix' : 'Gst',
+ 'symbol_prefix' : 'gst',
+ 'export_packages' : pkg_name,
+ 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
+ 'install' : true,
+ 'extra_args' : gst_gir_extra_args,
+ }
+ library_def += {'gir': [gir]}
+ # When building statically the information about the gir is going to be
+ # consumed by `gst-build` to generate gir files linked against
+ # `libgstreamer-full-1.0.so`. We do not build it here as it is currently
+ # broken. Once that is fixed we could build it here, even though we would keep
+ # creating another gir which links against gst-full.
+ if not static_build
+ gst_gir = gnome.generate_gir(libgst, kwargs: gir)
+ gst_gen_sources += gst_gir
+ endif
endif
+gst_libraries += [[pkg_name, library_def]]
gst_compile_args = []
if get_option('default_library') == 'static'
sources : gst_gen_sources,
)
-meson.override_dependency('gstreamer-1.0', gst_dep)
+meson.override_dependency(pkg_name, gst_dep)