File: meson.build

package info (click to toggle)
appstream 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,408 kB
  • sloc: ansic: 51,906; xml: 10,459; cpp: 4,721; python: 538; sh: 260; makefile: 24
file content (61 lines) | stat: -rw-r--r-- 1,597 bytes parent folder | download | duplicates (3)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Meson definition for AppStream API Documentation

as_doc_html_target_dir = join_paths(as_doc_target_dir, 'html')

gidocgen_dep = dependency('gi-docgen',
  version: '>= 2021.1',
  native: true,
  required: true,
)
gidocgen_exe = find_program('gi-docgen')

gid_toml_conf = configuration_data()
gid_toml_conf.set('version', as_version)

asdoc_toml = configure_file(
    input: 'appstream.toml.in',
    output: 'appstream.toml',
    configuration: gid_toml_conf
)

custom_target('doc-api-appstream',
    input: [
      asdoc_toml,
      as_gir,
    ],
    output: 'api',
    command: [
      python_exe,
      meson.current_source_dir() / 'gi-docgen-helper.py',
      '--gidocgen=' + gidocgen_exe.full_path(),
      '--namespace=appstream',
      '--add-include-path=@0@'.format(meson.project_build_root() / 'src'),
      '--config=@INPUT0@',
      '--output-dir=@OUTPUT@',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT1@',
    ],
    depends: [
      as_gir,
    ],
    build_by_default: true,
    install: true,
    install_dir: get_option('prefix') / as_doc_html_target_dir,
)

# create symlink, so tools using gtk-doc can find the API documentation, without us
# duplicating the data in two places.
gtk_doc_root = join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc', 'html')
install_symlink(
    'appstream',
    pointing_to: '..' / '..' / '..' / as_doc_html_target_dir / 'api',
    install_dir: gtk_doc_root
)

#
# Build API documentation for libappstream-compose,
# if the library is enabled.
#
if get_option('compose')
    subdir('compose/')
endif