File: meson.build

package info (click to toggle)
mpd 0.24.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,760 kB
  • sloc: cpp: 75,041; python: 1,408; xml: 628; perl: 469; java: 289; sh: 286; ansic: 235; makefile: 105
file content (64 lines) | stat: -rw-r--r-- 1,709 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
if not get_option('html_manual') and not get_option('manpages')
  subdir_done()
endif

sphinx = find_program('sphinx-build', required: get_option('documentation'))
if not sphinx.found()
  subdir_done()
endif

if get_option('html_manual')
  sphinx_output = custom_target(
    'HTML documentation',
    output: 'html',
    input: [
      'index.rst', 'user.rst', 'developer.rst',
      'plugins.rst',
      'client.rst',
      'protocol.rst',
      'conf.py',
      'mpd.1.rst',
      'mpd.conf.5.rst',
      '_static/css/custom.css'
    ],
    command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
    build_by_default: true,
    install: true,
    install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
  )
endif

if get_option('manpages')
  custom_target(
    'Manpage documentation',
    output: ['mpd.1', 'mpd.conf.5'],
    input: [
      'mpd.1.rst',
      'mpd.conf.5.rst',
      'conf.py',
    ],
    command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTDIR@'],
    build_by_default: true,
    install: true,
    install_dir: [join_paths(get_option('mandir'), 'man1'), join_paths(get_option('mandir'), 'man5')],
  )
endif

if get_option('doxygen')

  doxygen = find_program('doxygen', required: true)
  conf_data = configuration_data()
  conf_data.set('VERSION', meson.project_version())
  conf_data.set('abs_top_srcdir', meson.source_root())
  doxyfile = configure_file(
    input: 'doxygen.conf.in',
    output: 'Doxyfile',
    configuration: conf_data
  )
  
  custom_target('Doxygen',
    command: [doxygen, doxyfile],
    output: ['api'],
    build_by_default: true
  )
endif