mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
meson: Build gir
This commit is contained in:
parent
b5281c18c4
commit
133e91462a
3 changed files with 33 additions and 1 deletions
|
@ -43,6 +43,7 @@ rtsp_server_headers = [
|
||||||
]
|
]
|
||||||
install_headers(rtsp_server_headers, subdir : 'gstreamer-1.0/gst/rtsp-server')
|
install_headers(rtsp_server_headers, subdir : 'gstreamer-1.0/gst/rtsp-server')
|
||||||
|
|
||||||
|
gst_rtsp_server_deps = [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep]
|
||||||
gst_rtsp_server = library('gstrtspserver-@0@'.format(api_version),
|
gst_rtsp_server = library('gstrtspserver-@0@'.format(api_version),
|
||||||
rtsp_server_sources,
|
rtsp_server_sources,
|
||||||
include_directories : rtspserver_incs,
|
include_directories : rtspserver_incs,
|
||||||
|
@ -50,10 +51,29 @@ gst_rtsp_server = library('gstrtspserver-@0@'.format(api_version),
|
||||||
version : libversion,
|
version : libversion,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
install : true,
|
install : true,
|
||||||
dependencies : [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep],
|
dependencies : gst_rtsp_server_deps,
|
||||||
vs_module_defs: vs_module_defs_dir + 'libgstrtspserver.def'
|
vs_module_defs: vs_module_defs_dir + 'libgstrtspserver.def'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
rtsp_server_gen_sources = []
|
||||||
|
if build_gir
|
||||||
|
gst_gir_extra_args = gir_init_section + ['--c-include=gst/rtsp-server/rtsp-server.h']
|
||||||
|
rtsp_server_gir = gnome.generate_gir(gst_rtsp_server,
|
||||||
|
sources : rtsp_server_headers + rtsp_server_sources,
|
||||||
|
namespace : 'GstRtspServer',
|
||||||
|
nsversion : api_version,
|
||||||
|
identifier_prefix : 'Gst',
|
||||||
|
symbol_prefix : 'gst',
|
||||||
|
export_packages : 'gstreamer-rtsp-server-' + api_version,
|
||||||
|
install : true,
|
||||||
|
extra_args : gst_gir_extra_args,
|
||||||
|
includes : ['Gst-1.0', 'GstRtsp-1.0', 'GstNet-1.0'],
|
||||||
|
dependencies : gst_rtsp_server_deps,
|
||||||
|
)
|
||||||
|
rtsp_server_gen_sources += [rtsp_server_gir]
|
||||||
|
endif
|
||||||
|
|
||||||
gst_rtsp_server_dep = declare_dependency(link_with : gst_rtsp_server,
|
gst_rtsp_server_dep = declare_dependency(link_with : gst_rtsp_server,
|
||||||
include_directories : rtspserver_incs,
|
include_directories : rtspserver_incs,
|
||||||
|
sources : rtsp_server_gen_sources,
|
||||||
dependencies : [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep])
|
dependencies : [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep])
|
||||||
|
|
|
@ -59,6 +59,15 @@ gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req,
|
||||||
|
|
||||||
vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
|
vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
|
||||||
|
|
||||||
|
gir = find_program('g-ir-scanner', required : false)
|
||||||
|
gnome = import('gnome')
|
||||||
|
build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
|
||||||
|
gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
|
||||||
|
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
|
||||||
|
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
|
||||||
|
'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
|
||||||
|
'gst_init(NULL,NULL);' ]
|
||||||
|
|
||||||
subdir('gst')
|
subdir('gst')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
subdir('examples')
|
subdir('examples')
|
||||||
|
|
3
meson_options.txt
Normal file
3
meson_options.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
option('disable_introspection',
|
||||||
|
type : 'boolean', value : false,
|
||||||
|
description : 'Whether to disable the introspection generation')
|
Loading…
Reference in a new issue