make documentation building optional

This commit is contained in:
Chris Cromer 2023-02-08 09:38:24 -03:00
parent 4a7cf9ec2e
commit b9a82a8e3c
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
2 changed files with 15 additions and 10 deletions

View File

@ -11,19 +11,20 @@ project('obelisk',
llvm = dependency('llvm', version: '>= 14.0.0', modules : ['core', 'target', 'mcjit', 'nativecodegen'], required : true, method: 'config-tool')
doxygen = find_program('doxygen', required : false)
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
if find_program('dot', required : false).found()
cdata.set('HAVE_DOT', 'YES')
else
cdata.set('HAVE_DOT', 'NO')
endif
if doxygen.found()
subdir('doc')
docs_enabled = get_option('docs')
if docs_enabled
doxygen = find_program('doxygen', required : false)
if doxygen.found()
if find_program('dot', required : false).found()
cdata.set('HAVE_DOT', 'YES')
else
cdata.set('HAVE_DOT', 'NO')
endif
subdir('doc')
endif
endif
subdir('src')

4
meson_options.txt Normal file
View File

@ -0,0 +1,4 @@
option('docs',
type: 'boolean',
value: true,
description: 'Build documentation for obelisk')