File: meson.build

package info (click to toggle)
libpanel 1.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,956 kB
  • sloc: ansic: 19,093; xml: 39; sh: 24; javascript: 13; makefile: 10
file content (45 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (2)
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
if get_option('docs').allowed() and get_option('introspection').allowed() 
  dependency('gi-docgen', version: '>= 2021.1',
           fallback: ['gi-docgen', 'dummy_dep'],
           native: true,
           required: get_option('docs'))

  gidocgen = find_program('gi-docgen')

  docdir = datadir / 'doc'

  toml_conf = configuration_data()
  toml_conf.set('PANEL_VERSION', meson.project_version())

  libpanel_toml = configure_file(
    input: 'libpanel.toml.in',
    output: 'libpanel.toml',
    configuration: toml_conf,
  )

  custom_target('panel-doc',
    input:  libpanel_gir[0],
    output: 'panel-1.0',
    command: [
      gidocgen,
      'generate',
      '--quiet',
      '--fatal-warnings',
      '--add-include-path=@0@'.format(meson.current_build_dir() / '../src'),
      '--config', libpanel_toml,
      '--output-dir=@OUTPUT@',
      '--no-namespace-dir',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT@',
    ],
    depend_files: [
      libpanel_toml,
      'introduction.md'
    ],
    build_by_default: true,
    install: true,
    install_dir: docdir,
  )
elif get_option('docs').allowed() and get_option('introspection').disabled() 
  error('docs require introspection')
endif