[Spice-devel] [PATCH spice-gtk 25/34] meson: add gtk_doc option

Christophe Fergeau cfergeau at redhat.com
Mon Jan 7 16:08:14 UTC 2019


On Mon, Jan 07, 2019 at 12:00:54PM +0400, marcandre.lureau at redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
> 
> This is based on similar meson code in GStreamer.
> (one of the core meson developer, Nirbheek, is also doing the GStreamer
> meson build support)
> 
> This allows me to install a meson-mingw64 build, with
> -Dgtk_doc=disabled, as it fails to build currently for other reasons
> which I don't have time to investigate yet.

Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> ---
>  meson.build       | 10 +++++++++-
>  meson_options.txt |  4 ++++
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index cb37056..b596a0f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -326,7 +326,15 @@ add_project_arguments(compiler.get_supported_arguments(spice_gtk_global_cflags),
>  subdir('src')
>  subdir('tools')
>  subdir('tests')
> -subdir('doc')
> +if build_machine.system() == 'windows'
> +  message('Disabling gtk-doc while building on Windows')
> +else
> +  if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found()
> +    subdir('doc')
> +  else
> +    message('Not building documentation as gtk-doc was not found')
> +  endif
> +endif
>  subdir('data')
>  subdir('man')
>  subdir('po')
> diff --git a/meson_options.txt b/meson_options.txt
> index 8dcded2..ff4654d 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -76,3 +76,7 @@ option('opus',
>  option('smartcard',
>      type : 'feature',
>      description : 'Enable smartcard support')
> +
> +option('gtk_doc',
> +       type : 'feature',
> +       description : 'Generate API documentation with gtk-doc')
> -- 
> 2.20.1.2.gb21ebb671b
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190107/54cd6b6d/attachment.sig>


More information about the Spice-devel mailing list