summaryrefslogtreecommitdiff
path: root/doc/meson.build
diff options
context:
space:
mode:
authorThomas Booker <tw.booker@outlook.com>2022-09-10 14:11:44 +1200
committerCoderThomasB <tw.booker@outlook.com>2022-09-28 09:37:27 +1300
commit837c050e48ea73f6dcf5ef9ff7120bc7da8b38ad (patch)
tree63f04cc81df87161f3d3c1ad5122b04a64741bc1 /doc/meson.build
parent35bcba928650b415b4d8a572b4d9b19384234ee6 (diff)
downloadat-spi2-core-837c050e48ea73f6dcf5ef9ff7120bc7da8b38ad.tar.gz
Docs: Move to gi-docgen
Diffstat (limited to 'doc/meson.build')
-rw-r--r--doc/meson.build76
1 files changed, 74 insertions, 2 deletions
diff --git a/doc/meson.build b/doc/meson.build
index 5fcf20e2..0de4f72e 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,2 +1,74 @@
-subdir('libatspi')
-subdir('atk')
+dependency('gi-docgen', version: '>= 2021.1',
+ fallback: ['gi-docgen', 'dummy_dep'],
+ native: true,
+ required: get_option('docs'))
+
+gidocgen = find_program('gi-docgen')
+
+docs_dir = atspi_datadir / 'doc'
+
+gidocgen_common_args = [
+ '--quiet',
+ '--no-namespace-dir',
+ '--fatal-warnings',
+]
+
+################################ ATK
+atk_expand_content_files =[]
+
+atk_toml_data = configuration_data()
+atk_toml_data.set('VERSION', meson.project_version())
+
+atk_toml = configure_file(
+ input: 'atk.toml.in',
+ output: 'atk.toml',
+ configuration: atk_toml_data
+)
+
+custom_target('atk-doc',
+ input: [ atk_toml, atk_gir[0] ],
+ output: 'atk',
+ command: [
+ gidocgen,
+ 'generate',
+ gidocgen_common_args,
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@',
+ ],
+ install: true,
+ install_dir: docs_dir,
+ depend_files: atk_expand_content_files,
+)
+
+
+################################ libatspi
+libatspi_expand_content_files = []
+
+libatspi_toml_data = configuration_data()
+libatspi_toml_data.set('VERSION', meson.project_version())
+
+libatspi_toml = configure_file(
+ input: 'libatspi.toml.in',
+ output: 'libatspi.toml',
+ configuration: libatspi_toml_data
+)
+
+custom_target('libatspi-doc',
+ input: [ libatspi_toml, libatspi_gir[0] ],
+ output: 'libatspi',
+ command: [
+ gidocgen,
+ 'generate',
+ gidocgen_common_args,
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@',
+ ],
+ install: true,
+ install_dir: docs_dir,
+ depend_files: libatspi_expand_content_files,
+)
+