Skip to content

Commit

Permalink
meson: Make demo optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano committed Apr 23, 2024
1 parent 1a14063 commit fd1f5a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
5 changes: 4 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ libchcase_deps = [
]

subdir('lib')
subdir('examples')

if get_option('demo')
subdir('examples')
endif

if get_option('doc')
doc_outdir = 'docs'
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit fd1f5a2

Please sign in to comment.