meson.build: move doxygen check to doc/meson.build
[ncmpc-debian.git] / doc / meson.build
1 if get_option('documentation')
2   doxygen = find_program('doxygen', required: false)
3
4   if doxygen.found()
5     dconf = configuration_data()
6     dconf.set('VERSION', meson.project_version())
7     dconf.set('abs_top_srcdir', meson.source_root())
8
9     doxyfile = configure_file(input: 'doxygen.conf.in',
10                               output: 'doxygen.conf',
11                               configuration: dconf)
12
13     datadir = join_paths(get_option('datadir'), 'doc', 'spede')
14
15     html_target = custom_target('apidocs',
16                                 input: doxyfile,
17                                 output: 'html',
18                                 command: [doxygen, doxyfile],
19                                 install: true,
20                                 install_dir: docdir)
21   endif
22 endif