diff --git a/docs/meson.build b/docs/meson.build index 83dbacd04a8..eb33509503d 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -22,8 +22,13 @@ html_docs = custom_target( build_by_default: get_option('html-docs').enabled(), ) +html_docs_path = get_option('html-docs-path') +if html_docs_path == '' + html_docs_path = join_paths(get_option('datadir'), 'doc', 'mesa') +endif + install_subdir(html_docs.full_path(), - install_dir: join_paths(get_option('datadir'), 'doc', 'mesa'), + install_dir: html_docs_path, exclude_files: ['.buildinfo'], exclude_directories: ['.doctrees'], strip_directory: true diff --git a/meson_options.txt b/meson_options.txt index 8fa77670e61..d07c335a2e8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -490,6 +490,13 @@ option( description : 'Build HTML documentation.' ) +option( + 'html-docs-path', + type : 'string', + value : '', + description : 'Location to install HTML documentation. Default: $datadir/doc/mesa.' +) + option( 'selinux', type : 'boolean',