diff options
-rw-r--r-- | doc/meson.build | 49 | ||||
-rw-r--r-- | meson.build | 6 | ||||
-rw-r--r-- | meson_options.txt | 1 |
3 files changed, 56 insertions, 0 deletions
diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 0000000..3c1b8f9 --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,49 @@ + headerdir = join_paths(meson.source_root(), 'va') +footer = join_paths(meson.current_source_dir(), 'va_footer.html') + +libva_headers_doc = [ + 'va.h', + 'va_enc_h264.h', + 'va_enc_mpeg2.h', + 'va_enc_jpeg.h', + 'va_enc_hevc.h', + 'va_enc_vp8.h', + 'va_enc_vp9.h', + 'va_fei.h', + 'va_fei_h264.h', + 'va_fei_hevc.h', + 'va_dec_hevc.h', + 'va_dec_jpeg.h', + 'va_dec_vp8.h', + 'va_dec_vp9.h', + 'va_vpp.h' +] + +libva_doc_files = [] +headers = '' +foreach h : libva_headers_doc + libva_doc_files += join_paths (headerdir, h) + headers += ' ' + join_paths (headerdir, h) +endforeach + +config = configuration_data() +config.set('PACKAGE_VERSION', meson.project_version()) +config.set('VA_HEADER_DIR', headerdir) +config.set('VA_HEADER_FILES', headers) +config.set('VA_HTML_FOOTER', footer) +config.set('OUTDIR', meson.current_build_dir()) + +doxyfile = configure_file( + input: 'Doxyfile.in', + output: 'Doxyfile', + configuration: config) + +doc_install_dir = join_paths(get_option('datadir'), 'doc', meson.project_name()) +custom_target( + 'doc', + command: [ doxygen, doxyfile ], + depend_files: libva_doc_files, + input: doxyfile, + output: 'html-out', + install: true, + install_dir: doc_install_dir) diff --git a/meson.build b/meson.build index f7ae4cd..d24a597 100644 --- a/meson.build +++ b/meson.build @@ -115,3 +115,9 @@ endif subdir('va') subdir('pkgconfig') + +doxygen = find_program('doxygen', required: false) + +if get_option('enable_docs') and doxygen.found() + subdir('doc') +endif diff --git a/meson_options.txt b/meson_options.txt index 3b9a68a..0f7261a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,3 +3,4 @@ option('disable_drm', type : 'boolean', value : false) option('with_x11', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto') option('with_glx', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto') option('with_wayland', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto') +option('enable_docs', type : 'boolean', value : false) |