File: meson.build

package info (click to toggle)
libhinoko 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 544 kB
  • sloc: ansic: 2,557; python: 693; makefile: 9; javascript: 5
file content (45 lines) | stat: -rw-r--r-- 977 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ext_contents = [
  'overview.md',
  'overview.png',
]

conf = configuration_data()
conf.set('VERSION', meson.project_version())

doc_toml = configure_file(
  input: 'hinoko.toml.in',
  output: 'hinoko.toml',
  configuration: conf,
)

dependency('gi-docgen',
  version: '>= 2023.1',
  fallback: ['gi-docgen', 'dummy_dep'],
)
gidocgen = find_program('gi-docgen')

subproject_dependent_args = []
if hinawa_is_subproject
  subproject_dependent_args = ['--add-include-path', hinawa_gir_dir]
endif

doc_dir = meson.project_name()

custom_target('hinoko-doc',
  input: [ doc_toml, hinoko_gir[0] ],
  output: doc_dir,
  command: [
    gidocgen,
    'generate',
    subproject_dependent_args,
    '--no-namespace-dir',
    '--config=@INPUT0@',
    '--output-dir=@OUTPUT@',
    '--content-dir=@0@'.format(meson.current_source_dir()),
    '@INPUT1@',
  ],
  depend_files: ext_contents,
  build_by_default: true,
  install: true,
  install_dir: join_paths(get_option('datadir'), 'doc'),
)