diff --git a/meson.build b/meson.build index 279245ac2..4d8191787 100644 --- a/meson.build +++ b/meson.build @@ -282,7 +282,9 @@ subdir('libnvme') if get_option('tests') subdir('test') endif -subdir('examples') +if get_option('examples') + subdir('examples') +endif subdir('doc') ################################################################################ diff --git a/meson_options.txt b/meson_options.txt index 051b4ae53..48a93dae3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,7 @@ option('rstdir', type : 'string', value : '', description : 'directory for ReST option('docs', type : 'combo', choices : ['false', 'html', 'man', 'rst', 'all'], description : 'install documentation') option('docs-build', type : 'boolean', value : false, description : 'build documentation') +option('examples', type : 'boolean', value : true, description : 'build examples') option('tests', type : 'boolean', value : true, description : 'build tests') option('python', type : 'feature', value: 'auto', description : 'Generate libnvme python bindings')