summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-10-25 12:21:07 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-10-25 12:21:07 +0530
commit9154132135de8a013a2564d2d550555db70f2232 (patch)
treec6d9c40dcaa56cf7332abc82dc76d881914a6f57
parenteab0e76268c7cb3f97429d7892c2358daae38e21 (diff)
meson: Add an option to explicitly disable gtk-doc
Similar to how Autotools provides an option, default is 'enabled'.
-rw-r--r--meson.build13
-rw-r--r--meson_options.txt1
2 files changed, 8 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 6fe6fa8c65..8163c6d852 100644
--- a/meson.build
+++ b/meson.build
@@ -308,18 +308,19 @@ subdir('plugins')
subdir('tools')
subdir('pkgconfig')
subdir('tests')
+subdir('po')
-gtkdoc = find_program('gtkdoc-scan', required : false)
-if build_machine.system() != 'windows'
- if gtkdoc.found()
+if build_machine.system() == 'windows'
+ message('Disabling gtk-doc while building on Windows')
+elif get_option('disable_gtkdoc')
+ message('gtk-doc is disabled via options')
+else
+ if find_program('gtkdoc-scan', required : false).found()
subdir('docs')
else
message('Not building documentation as gtk-doc was not found')
endif
-else
- message('Disabling gtk-doc while building on Windows')
endif
-subdir('po')
python3 = find_program('python3')
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
diff --git a/meson_options.txt b/meson_options.txt
index 52af8d5113..f65abe8e7b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,6 @@
option('build_tools', type : 'boolean', value : true)
option('poisoning', type : 'boolean', value : false)
+option('disable_gtkdoc', type : 'boolean', value : false)
option('disable_examples', type : 'boolean', value : false)
option('disable_registry', type : 'boolean', value : false)
option('library_format', type : 'combo', choices : ['shared', 'static', 'both'], value : 'shared')