]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Add documentation installation directory option
authorChris Mayo <aklhfex@gmail.com>
Fri, 26 Feb 2021 19:11:06 +0000 (19:11 +0000)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Mar 2021 11:13:38 +0000 (12:13 +0100)
Allow the directory to be chosen at installation time, to support local
conventions e.g. versioning.

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
meson.build
meson_options.txt

index e5d5c4e14df8edec78f2a677d27ff96f11b4cf98..c81c6ab20556d1228aa39672deabd555fbe1f023 100644 (file)
@@ -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()
 
 
index e5d79c2b6b463c20f6e6eba5b3de8b707a5fb9d9..2606648b6442a42475ba35d3a50097d454bd7abe 100644 (file)
@@ -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')