src/meson.build: Enable generating valadocs for the client library

This commit is contained in:
Michael Gratton 2020-04-08 11:59:44 +10:00 committed by Michael James Gratton
parent f59ee8019a
commit 262bc51587
3 changed files with 38 additions and 19 deletions

View file

@ -70,6 +70,7 @@ webkit2gtk = dependency('webkit2gtk-4.0', version: '>=' + target_webkit)
# We need appdata.its from appstream-glib:
# https://gitlab.gnome.org/GNOME/geary/issues/439
appstream_glib = dependency('appstream-glib', version: '>=0.7.10')
cairo = dependency('cairo')
enchant = dependency('enchant-2', version: '>=2.1')
folks = dependency('folks', version: '>=0.11')
gck = dependency('gck-1')

View file

@ -142,11 +142,6 @@ geary_client_vala_sources = files(
'util/util-migrate.vala',
)
geary_client_sources = [
geary_client_vala_sources,
geary_resources # Included here so valac can check them
]
geary_client_dependencies = [
enchant,
folks,
@ -187,7 +182,7 @@ endif
# Main client application library
geary_client_lib = shared_library(
geary_client_package,
geary_client_sources,
geary_client_vala_sources + geary_resources,
dependencies: geary_client_dependencies,
include_directories: config_h_dir,
vala_args: geary_client_vala_args,

View file

@ -109,11 +109,43 @@ geary_bin = executable('geary',
install_rpath: client_lib_dir,
)
valadoc_dependencies = [
cairo,
enchant,
folks,
gcr,
gdk,
gee,
gio,
glib,
gmime,
goa,
gspell,
gtk,
javascriptcoregtk,
json_glib,
libhandy,
libpeas,
libsecret,
libxml,
sqlite,
webkit2gtk
]
# Hopefully Meson will get baked-in valadoc support, so we don't have
# to do this any more. https://github.com/mesonbuild/meson/issues/894
valadoc_dep_args = []
foreach dep : valadoc_dependencies
valadoc_dep_args += '--pkg'
valadoc_dep_args += dep.name()
endforeach
valadoc_dep_args += [ '--pkg', 'posix' ]
if enable_valadoc
geary_docs = custom_target('valadoc',
build_by_default: true,
depends: geary_engine_lib,
input: geary_engine_sources,
depends: [geary_client_lib, geary_engine_lib],
input: geary_client_vala_sources + geary_engine_sources,
output: 'valadoc',
command: [ valadoc,
'--verbose',
@ -123,19 +155,10 @@ if enable_valadoc
'--package-version=@0@'.format(meson.project_version()),
'-b', meson.current_source_dir(),
'-o', '@OUTPUT@',
'--vapidir=@0@'.format('/usr/share/vala-0.48'),
'--vapidir=@0@'.format(vapi_dir),
'--vapidir=@0@'.format(meson.current_build_dir()),
# Hopefully, Meson gets baked-in valadoc support, so we don't
# have to do this (see https://github.com/mesonbuild/meson/issues/894)
'--pkg', 'glib-2.0',
'--pkg', 'gio-2.0',
'--pkg', 'gee-0.8',
'--pkg', 'sqlite3',
'--pkg', 'gmime-3.0',
'--pkg', 'javascriptcoregtk-4.0',
'--pkg', 'libxml-2.0',
'--pkg', 'libunwind',
'@INPUT@',
]
] + valadoc_dep_args
)
endif