diff --git a/README.md b/README.md index e9f6406..68555eb 100644 --- a/README.md +++ b/README.md @@ -101,8 +101,10 @@ To install, use `ninja install` ninja install -C builddir ``` -To see a demo app, run: +You can optionally build and run a demo app: ```bash -./build/examples/example +meson configure builddir -Ddemo=true +ninja -C builddir +./builddir/examples/example ``` diff --git a/meson.build b/meson.build index 718f143..20d12ed 100644 --- a/meson.build +++ b/meson.build @@ -14,7 +14,10 @@ libchcase_deps = [ ] subdir('lib') -subdir('examples') + +if get_option('demo') + subdir('examples') +endif if get_option('doc') doc_outdir = 'docs' diff --git a/meson_options.txt b/meson_options.txt index 213182b..d2e3665 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('doc', type: 'boolean', value: false, description: 'Whether to generate valadoc') +option('demo', type: 'boolean', value: false, description: 'Whether to build demo app')