From: Chris Mayo Date: Fri, 26 Feb 2021 19:11:06 +0000 (+0000) Subject: meson: Add documentation installation directory option X-Git-Tag: v7.2.0-rc1~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee4a392ddad11b1dd7918f98efe8a80eb75dc00e;p=thirdparty%2Flibvirt.git meson: Add documentation installation directory option Allow the directory to be chosen at installation time, to support local conventions e.g. versioning. Signed-off-by: Chris Mayo Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik --- diff --git a/meson.build b/meson.build index e5d5c4e14d..c81c6ab205 100644 --- a/meson.build +++ b/meson.build @@ -83,8 +83,12 @@ mandir = prefix / get_option('mandir') sbindir = prefix / get_option('sbindir') sharedstatedir = prefix / get_option('sharedstatedir') +docdir = get_option('docdir') +if docdir == '' + docdir = datadir / 'doc' / meson.project_name() +endif + confdir = sysconfdir / meson.project_name() -docdir = datadir / 'doc' / meson.project_name() pkgdatadir = datadir / meson.project_name() diff --git a/meson_options.txt b/meson_options.txt index e5d79c2b6b..2606648b64 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,6 +7,7 @@ option('expensive_tests', type: 'feature', value: 'auto', description: 'set the option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation') option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT') option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries') +option('docdir', type: 'string', value: '', description: 'documentation installation directory') option('docs', type: 'feature', value: 'auto', description: 'whether to generate documentation') option('tests', type: 'feature', value: 'auto', description: 'whether to build tests')