From ffa4077f696585ab671ae3dcdb1ebfc53705ab91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 16 Jan 2019 16:13:30 +0400 Subject: [PATCH spice-gtk 1/2] meson: improve gtk-doc build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix the following warnings: ./spice-gtk-sections.txt:467: warning: No declaration found for SPICE_GTK_CHECK_VERSION. ./spice-gtk-sections.txt:468: warning: No declaration found for SPICE_GTK_MAJOR_VERSION. ./spice-gtk-sections.txt:469: warning: No declaration found for SPICE_GTK_MICRO_VERSION. ./spice-gtk-sections.txt:470: warning: No declaration found for SPICE_GTK_MINOR_VERSION. - fixxref for glib and gtk (thus requires gtk+ to build doc) - And other minor simplifications. After autotools is removed, we should try to use --rebuild-types. For now I prefer not to touch it :) Signed-off-by: Marc-André Lureau --- doc/reference/meson.build | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/doc/reference/meson.build b/doc/reference/meson.build index a121e66..72fcabe 100644 --- a/doc/reference/meson.build +++ b/doc/reference/meson.build @@ -38,14 +38,33 @@ ignore_headers = [ spice_gtk_doc_dep = declare_dependency(link_with : [spice_client_gtk_lib, spice_client_glib_lib]) -gnome.gtkdoc('spice-gtk', - content_files : ['spice-gtk-overrides.txt', 'spice-gtk-overrides.txt'], +glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix') +glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') +gtk_prefix = dependency('gtk+-3.0').get_pkgconfig_variable('prefix') +gtk_docpath = join_paths(gtk_prefix, 'share', 'gtk-doc', 'html') +docpath = join_paths(spice_gtk_datadir, 'gtk-doc', 'html') + +gnome.gtkdoc(meson.project_name(), dependencies : spice_gtk_doc_dep, - main_xml : 'spice-gtk-docs.xml', - gobject_typesfile : files('spice-gtk.types'), + main_xml : meson.project_name() + '-docs.xml', + gobject_typesfile : meson.project_name() + '.types', ignore_headers : ignore_headers, include_directories: spice_gtk_include, c_args : '-DSPICE_COMPILATION', install : true, - scan_args : ['--deprecated-guards="SPICE_DISABLE_DEPRECATED"', '--ignore-decorators="G_GNUC_INTERNAL"'], - src_dir : join_paths(meson.source_root(), 'src')) + scan_args : [ + '--deprecated-guards="SPICE_DISABLE_DEPRECATED"', + '--ignore-decorators="G_GNUC_INTERNAL"' + ], + src_dir : [ + join_paths(meson.source_root(), 'src'), + join_paths(meson.build_root(), 'src'), + ], + fixxref_args: [ + '--html-dir=@0@'.format(docpath), + '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')), + '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')), + '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')), + '--extra-dir=@0@'.format(join_paths(gtk_docpath, 'gtk3')), + ], + ) -- 2.20.1.98.gecbdaf0899