Skip to content

Commit

Permalink
meson:doc: Build libraries documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaunier committed Dec 16, 2016
1 parent f4ed0e1 commit 6f50b59
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/libs/meson.build
@@ -0,0 +1,24 @@
types = configure_file(input : 'gst-plugins-base-libs.types',
output : 'gst-plugins-base-libs.types',
configuration : configuration_data())

ignored_headers = ['pbutils-private.h', 'gsttageditingprivate.h', 'id3v2.h',
'kiss_fft_f32.h', 'kiss_fft_f64.h', 'kiss_fftr_f32.h', 'kiss_fftr_f64.h',
'kiss_fftr_s16.h', 'kiss_fftr_s32.h', 'kiss_fft_s16.h', 'kiss_fft_s32.h',
'_kiss_fft_guts_f32.h', '_kiss_fft_guts_f64.h', '_kiss_fft_guts_s16.h',
'_kiss_fft_guts_s16.h', '_kiss_fft_guts_s32.h', '_kiss_fft_guts_s32.h',
'pbutils-marshal.h']

gnome.gtkdoc('gst-plugins-base-libs',
main_sgml : 'gst-plugins-base-libs-docs.sgml',
src_dir : '@0@/../../gst-libs/gst'.format(meson.current_source_dir()),
scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED',
'--ignore-decorators=GST_EXPORT'],
ignore_headers : ignored_headers,
scanobjs_args : ['--type-init-func=gst_init(NULL,NULL)'],
gobject_typesfile : types,
content_files : [version_entities],
dependencies : [gst_base_dep, app_dep, allocators_dep, audio_dep,
fft_dep, pbutils_dep, riff_dep, rtp_dep, rtsp_dep, sdp_dep,
tag_dep, video_dep],
install : true)
11 changes: 11 additions & 0 deletions docs/meson.build
@@ -0,0 +1,11 @@
docconf = configuration_data()

docconf.set('GST_API_VERSION', api_version)
docconf.set('PACKAGE_VERSION', gst_version)
docconf.set('PLUGINDIR', '@0@/lib/gstreamer-1.0'.format(get_option('prefix')))

version_entities = configure_file(input : 'version.entities.in',
output : 'version.entities',
configuration : docconf)

subdir('libs')
12 changes: 12 additions & 0 deletions meson.build
Expand Up @@ -242,6 +242,18 @@ subdir('tools')
subdir('tests')
subdir('pkgconfig')

if build_machine.system() == 'windows'
message('Disabling gtk-doc while building on Windows')
elif get_option('disable_gtkdoc')
message('gtk-doc is disabled via options')
else
if find_program('gtkdoc-scan', required : false).found()
subdir('docs')
else
message('Not building documentation as gtk-doc was not found')
endif
endif

# Use core_conf after all subdirs have set values
configure_file(input : 'config.h.meson',
output : 'config.h',
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Expand Up @@ -4,3 +4,4 @@ option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto
option('disable_introspection',
type : 'boolean', value : false,
description : 'Whether to disable the introspection generation')
option('disable_gtkdoc', type : 'boolean', value : false)

0 comments on commit 6f50b59

Please sign in to comment.