diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-04-13 13:52:26 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-04-13 14:11:43 -0300 |
commit | 133e91462a337c61ba31715b0580adaa6652fca0 (patch) | |
tree | 9a260ea50d77a86d8b2c1037621311871699335a | |
parent | b5281c18c45a4be34d3447bd58e8bd9606e01402 (diff) |
meson: Build gir
-rw-r--r-- | gst/rtsp-server/meson.build | 22 | ||||
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | meson_options.txt | 3 |
3 files changed, 33 insertions, 1 deletions
diff --git a/gst/rtsp-server/meson.build b/gst/rtsp-server/meson.build index d65a078..d4b28fc 100644 --- a/gst/rtsp-server/meson.build +++ b/gst/rtsp-server/meson.build @@ -43,6 +43,7 @@ rtsp_server_headers = [ ] 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), rtsp_server_sources, include_directories : rtspserver_incs, @@ -50,10 +51,29 @@ gst_rtsp_server = library('gstrtspserver-@0@'.format(api_version), version : libversion, soversion : soversion, 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' ) +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, include_directories : rtspserver_incs, + sources : rtsp_server_gen_sources, dependencies : [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep]) diff --git a/meson.build b/meson.build index 3736be2..31f376e 100644 --- a/meson.build +++ b/meson.build @@ -59,6 +59,15 @@ gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req, 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('tests') subdir('examples') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..e265545 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,3 @@ +option('disable_introspection', + type : 'boolean', value : false, + description : 'Whether to disable the introspection generation') |