mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 10:56:38 +00:00
57c8e0146f
Add new GST_API_EXPORT in config.h and use that for GST_*_API decorators instead of GST_EXPORT. The right export define depends on the toolchain and whether we're using -fvisibility=hidden or not, so it's better to set it to the right thing directly than hard-coding a compiler whitelist in the public header. We put the export define into config.h instead of passing it via the command line to the compiler because it might contain spaces and brackets and in the autotools scenario we'd have to pass that through multiple layers of plumbing and Makefile/shell escaping and we're just not going to be *that* lucky. The export define is only used if we're compiling our lib, not by external users of the lib headers, so it's not a problem to put it into config.h Also, this means all .c files of libs need to include config.h to get the export marker defined, so fix up a few that didn't include config.h. This commit depends on a common submodule commit that makes gst-glib-gen.mak add an #include "config.h" to generated enum/marshal .c files for the autotools build. https://bugzilla.gnome.org/show_bug.cgi?id=797185
72 lines
2.4 KiB
Meson
72 lines
2.4 KiB
Meson
gst_controller_sources = [
|
|
'gstargbcontrolbinding.c',
|
|
'gstdirectcontrolbinding.c',
|
|
'gsttimedvaluecontrolsource.c',
|
|
'gstinterpolationcontrolsource.c',
|
|
'gstproxycontrolbinding.c',
|
|
'gsttriggercontrolsource.c',
|
|
'gstlfocontrolsource.c',
|
|
]
|
|
|
|
controller_mkenum_headers = [
|
|
'gstinterpolationcontrolsource.h',
|
|
'gstlfocontrolsource.h',
|
|
]
|
|
|
|
gst_controller_headers = controller_mkenum_headers + [
|
|
'gstargbcontrolbinding.h',
|
|
'gstdirectcontrolbinding.h',
|
|
'gsttimedvaluecontrolsource.h',
|
|
'gstinterpolationcontrolsource.h',
|
|
'gstproxycontrolbinding.h',
|
|
'gsttriggercontrolsource.h',
|
|
'gstlfocontrolsource.h',
|
|
'controller-prelude.h',
|
|
'controller.h',
|
|
]
|
|
install_headers(gst_controller_headers, subdir : 'gstreamer-1.0/gst/controller/')
|
|
|
|
controller_enums = gnome.mkenums_simple('controller-enumtypes',
|
|
sources : controller_mkenum_headers,
|
|
header_prefix : '#include <gst/controller/controller-prelude.h>',
|
|
body_prefix : '#include "config.h"',
|
|
decorator : 'GST_CONTROLLER_API',
|
|
install_header : true,
|
|
install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/controller'))
|
|
gstcontroller_c = controller_enums[0]
|
|
gstcontroller_h = controller_enums[1]
|
|
|
|
gst_controller_gen_sources = [gstcontroller_h]
|
|
gst_controller = library('gstcontroller-@0@'.format(apiversion),
|
|
gst_controller_sources, gstcontroller_h, gstcontroller_c,
|
|
c_args : gst_c_args + ['-DBUILDING_GST_CONTROLLER'],
|
|
install : true,
|
|
version : libversion,
|
|
soversion : soversion,
|
|
darwin_versions : osxversion,
|
|
include_directories : [configinc, libsinc],
|
|
dependencies : [gobject_dep, glib_dep, mathlib, gst_dep],
|
|
)
|
|
|
|
if build_gir
|
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/controller/controller.h' ]
|
|
gst_controller_gir = gnome.generate_gir(gst_controller,
|
|
sources : gst_controller_sources + gst_controller_headers + [gstcontroller_h] + [gstcontroller_c],
|
|
namespace : 'GstController',
|
|
nsversion : apiversion,
|
|
identifier_prefix : 'Gst',
|
|
symbol_prefix : 'gst',
|
|
export_packages : 'gstreamer-controller-1.0',
|
|
dependencies : [gst_dep],
|
|
include_directories : [configinc, libsinc, privinc],
|
|
includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'],
|
|
install : true,
|
|
extra_args : gst_gir_extra_args,
|
|
)
|
|
gst_controller_gen_sources += [gst_controller_gir]
|
|
endif
|
|
|
|
gst_controller_dep = declare_dependency(link_with : gst_controller,
|
|
include_directories : [libsinc],
|
|
sources: gst_controller_gen_sources,
|
|
dependencies : [gst_dep])
|