diff --git a/meson.build b/meson.build index 531e8abef5f1f667677ed3b6507cf1d97b4984df..698d4c2c94d5008a9f755c7f4f58a3d1c2b6b194 100644 --- a/meson.build +++ b/meson.build @@ -225,9 +225,7 @@ if dep_check.found() endif doxygen = find_program('doxygen', required: get_option('documentation')) -if doxygen.found() - doxygen = find_program('doxygen') - +if doxygen.found() and get_option('documentation').enabled() src_doxygen = files( # source files join_paths(dir_src, 'libevdev.h'), @@ -263,11 +261,13 @@ if doxygen.found() doxyfile = configure_file(input: 'doc/libevdev.doxygen.in', output: 'libevdev.doxygen', configuration: doc_config) + docdir = join_paths(get_option('datadir'), 'doc', meson.project_name()) custom_target('doxygen', input: [doxyfiles, doxyfile] + src_doxygen, - output: ['.'], + output: 'html', command: [doxygen, doxyfile], - install: false, + install: true, + install_dir: docdir, build_by_default: true) endif