mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
meson: Convert common options to feature options
The rest will be converted later, these are necessary for gst-build to set options correctly. https://bugzilla.gnome.org/show_bug.cgi?id=795107
This commit is contained in:
parent
0dbfa44839
commit
fa3648d5fe
4 changed files with 24 additions and 28 deletions
|
@ -1,6 +1,6 @@
|
|||
project('gst-devtools', 'c',
|
||||
version : '1.15.0.1',
|
||||
meson_version : '>= 0.46.0',
|
||||
meson_version : '>= 0.47',
|
||||
default_options : [ 'warning_level=1',
|
||||
'c_std=gnu99',
|
||||
'buildtype=debugoptimized' ])
|
||||
|
@ -88,12 +88,10 @@ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' +
|
|||
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
|
||||
'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
|
||||
'gst_init(NULL,NULL);' ]
|
||||
gir = find_program('g-ir-scanner', required : false)
|
||||
build_gir = gir.found() and not meson.is_cross_build() and get_option('introspection')
|
||||
gir = find_program('g-ir-scanner', required : get_option('introspection'))
|
||||
build_gir = gir.found() and not meson.is_cross_build()
|
||||
gnome = import('gnome')
|
||||
|
||||
gtkdoc = find_program('gtkdoc-scan', required : false)
|
||||
|
||||
if gst_dep.type_name() == 'internal'
|
||||
gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
|
||||
else
|
||||
|
|
|
@ -2,7 +2,7 @@ option('validate', type : 'boolean', value : true,
|
|||
description : 'Build GstValidate')
|
||||
option('debug_viewer', type : 'boolean', value : true,
|
||||
description : 'Build GstDebugViewer')
|
||||
option('introspection', type : 'boolean', value : true, yield : true,
|
||||
description : 'Generate gobject-introspection bindings')
|
||||
option('gtk_doc', type : 'boolean', value : true, yield : true,
|
||||
description : 'Generate API documentation with gtk-doc')
|
||||
option('gtk_doc', type : 'feature', value : 'auto', yield : true,
|
||||
description : 'Build API documentation with gtk-doc')
|
||||
option('introspection', type : 'feature', value : 'auto', yield : true,
|
||||
description : 'Generate gobject-introspection bindings')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
types = configure_file(input : 'gst-validate.types',
|
||||
output : 'gst-validate.types',
|
||||
configuration : configuration_data())
|
||||
copy: true)
|
||||
|
||||
doc_deps_names = ['glib-2.0',
|
||||
'gstreamer-@0@'.format(apiversion),
|
||||
|
@ -8,6 +8,7 @@ doc_deps_names = ['glib-2.0',
|
|||
|
||||
doc_deps = []
|
||||
foreach doc_dep : doc_deps_names
|
||||
# FIXME: use get_pkgconfig_variable() instead
|
||||
runcmd = run_command('pkg-config', '--variable=prefix', doc_dep)
|
||||
if runcmd.returncode() == 0
|
||||
tmp = '--extra-dir=' + runcmd.stdout().strip() + '/share/gtk-doc/html/'
|
||||
|
@ -16,18 +17,16 @@ foreach doc_dep : doc_deps_names
|
|||
endif
|
||||
endforeach
|
||||
|
||||
if gtkdoc.found()
|
||||
gnome.gtkdoc('gst-validate',
|
||||
main_sgml : 'gst-validate-docs.sgml',
|
||||
src_dir : '@0@/../../gst/validate'.format(meson.current_source_dir()),
|
||||
scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED',
|
||||
'--ignore-decorators=GST_VALIDATE_API',
|
||||
'--ignore-headers=gettext.h gst-validate-internal.h gst-validate-monitor.h gst-validate-bin-monitor.h gst-validate-element-monitor.h gst-validate-pad-monitor.h gst-validate-override.h gst-validate-override-registry.h gst-validate-utils.h gst-validate-media-info.h gst-validate-report.h media-descriptor.h media-descriptor-parser.h media-descriptor-writer.h gst-validate-i18n-lib.h'
|
||||
],
|
||||
scanobjs_args : ['--type-init-func="gst_init(NULL,NULL)"'],
|
||||
gobject_typesfile : types,
|
||||
dependencies : [validate_dep],
|
||||
content_files : ['gst-validate.xml', 'gst-validate-transcoding.xml', 'gst-validate-media-check.xml', 'gst-validate-launcher.xml', 'envvariables.xml', 'scenarios.xml'],
|
||||
fixxref_args: doc_deps + ['--html-dir=' + get_option('prefix') + '/share/gtk-doc/html/'],
|
||||
install : true)
|
||||
endif
|
||||
gnome.gtkdoc('gst-validate',
|
||||
main_sgml : 'gst-validate-docs.sgml',
|
||||
src_dir : '@0@/../../gst/validate'.format(meson.current_source_dir()),
|
||||
scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED',
|
||||
'--ignore-decorators=GST_VALIDATE_API',
|
||||
'--ignore-headers=gettext.h gst-validate-internal.h gst-validate-monitor.h gst-validate-bin-monitor.h gst-validate-element-monitor.h gst-validate-pad-monitor.h gst-validate-override.h gst-validate-override-registry.h gst-validate-utils.h gst-validate-media-info.h gst-validate-report.h media-descriptor.h media-descriptor-parser.h media-descriptor-writer.h gst-validate-i18n-lib.h'
|
||||
],
|
||||
scanobjs_args : ['--type-init-func="gst_init(NULL,NULL)"'],
|
||||
gobject_typesfile : types,
|
||||
dependencies : [validate_dep],
|
||||
content_files : ['gst-validate.xml', 'gst-validate-transcoding.xml', 'gst-validate-media-check.xml', 'gst-validate-launcher.xml', 'envvariables.xml', 'scenarios.xml'],
|
||||
fixxref_args: doc_deps + ['--html-dir=' + get_option('prefix') + '/share/gtk-doc/html/'],
|
||||
install : true)
|
||||
|
|
|
@ -27,10 +27,9 @@ subdir('launcher')
|
|||
subdir('tools')
|
||||
if build_machine.system() == 'windows'
|
||||
message('Disabling gtk-doc while building on Windows')
|
||||
elif not get_option('gtk_doc')
|
||||
message('gtk-doc is disabled via options')
|
||||
else
|
||||
if find_program('gtkdoc-scan', required : false).found()
|
||||
gtkdoc = find_program('gtkdoc-scan', required : get_option('gtk_doc'))
|
||||
if gtkdoc.found()
|
||||
subdir('docs')
|
||||
else
|
||||
message('Not building documentation as gtk-doc was not found')
|
||||
|
|
Loading…
Reference in a new issue