[geary/mjog/enable-client-valadoc: 1/2] src/meson.build: Enable generating valadocs for the client library



commit 12b2053fa3dabf024ad2c8011c4539743d127648
Author: Michael Gratton <mike vee net>
Date:   Wed Apr 8 11:59:44 2020 +1000

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

 meson.build            |  1 +
 src/client/meson.build |  7 +------
 src/meson.build        | 50 +++++++++++++++++++++++++++++++++++++-------------
 3 files changed, 39 insertions(+), 19 deletions(-)
---
diff --git a/meson.build b/meson.build
index 84d22617..146913ee 100644
--- a/meson.build
+++ b/meson.build
@@ -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')
diff --git a/src/client/meson.build b/src/client/meson.build
index 794ed3a8..6f1d3014 100644
--- a/src/client/meson.build
+++ b/src/client/meson.build
@@ -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,
diff --git a/src/meson.build b/src/meson.build
index b3232e76..cb5bf098 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -109,11 +109,44 @@ 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
+  message(dep.name())
+  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 +156,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]