meson: Convert common options to feature options

The remaining automagic options are in tests and examples.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
This commit is contained in:
Nirbheek Chauhan 2018-07-25 17:20:02 +05:30
parent d6d8f35563
commit 43e075d81f
3 changed files with 10 additions and 11 deletions

View file

@ -1,6 +1,6 @@
types = configure_file(input : 'ges.types',
output : 'ges.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
# TODO: Use get_pkgconfig_variable()
runcmd = run_command('pkg-config', '--variable=prefix', doc_dep)
if runcmd.returncode() == 0
tmp = '--extra-dir=' + runcmd.stdout().strip() + '/share/gtk-doc/html/'

View file

@ -1,6 +1,6 @@
project('gst-editing-services', 'c',
version : '1.15.0.1',
meson_version : '>= 0.46.0',
meson_version : '>= 0.47',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
@ -99,11 +99,11 @@ endif
configure_file(output : 'config.h', configuration : cdata)
gir = find_program('g-ir-scanner', required : false)
gir = find_program('g-ir-scanner', required : get_option('introspection'))
gnome = import('gnome')
# Fixme, not very elegant.
build_gir = gir.found() and not meson.is_cross_build() and get_option('introspection')
build_gir = gir.found() and not meson.is_cross_build()
gir_init_section = [ '--add-init-section=' + \
'extern void gst_init(gint*,gchar**);' + \
'extern void ges_init(void);' + \
@ -206,10 +206,8 @@ endif
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()
if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found()
subdir('docs')
else
message('Not building documentation as gtk-doc was not found')

View file

@ -1,6 +1,6 @@
option('introspection', type : 'boolean', value : true, yield : true,
description : 'Generate gobject-introspection bindings')
option('gtk_doc', type : 'boolean', value : true, yield : true,
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')
option('pygi-overrides-dir', type : 'string', value : '',
description: 'Path to pygobject overrides directory')
description: 'Path to pygobject overrides directory')