meson: Don't build tests or examples in subprojects
When being included in a subproject these are not helpful and just slow
down the build process.
Change-Id: I613bee1a630809bf16314418ac401ff0aa8db5fd
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meson.build b/meson.build
index a8d360e..ae55b6a 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,9 @@
default_options: [
'warning_level=3',
'werror=true',
- 'cpp_std=c++17'
+ 'cpp_std=c++17',
+ 'tests=' + (meson.is_subproject() ? 'disabled' : 'auto'),
+ 'examples=' + (meson.is_subproject() ? 'false' : 'true'),
])
subdir('src')