summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build19
1 files changed, 4 insertions, 15 deletions
diff --git a/meson.build b/meson.build
index a9b223a..0d16eea 100644
--- a/meson.build
+++ b/meson.build
@@ -3,9 +3,7 @@ project('gvc', 'c',
default_options: 'default_library=static'
)
-if not meson.is_subproject()
- error('This project is only intended to be used as a subproject!')
-endif
+assert(meson.is_subproject(), 'This project is only intended to be used as a subproject!')
gnome = import('gnome')
@@ -68,13 +66,7 @@ cdata.set('HAVE_ALSA', enable_alsa)
static = get_option('default_library') == 'static'
enable_introspection = get_option('introspection')
-if not static and pkglibdir == ''
- error('Installing shared library, but pkglibdir is unset!')
-endif
-
-if static and enable_introspection
- error('Currently meson requires a shared library for building girs.')
-endif
+assert(static or pkglibdir != '', 'Installing shared library, but pkglibdir is unset!')
c_args = ['-DG_LOG_DOMAIN="Gvc"']
@@ -93,11 +85,8 @@ libgvc = library('gvc',
)
if enable_introspection
- if pkgdatadir == ''
- error('Installing introspection, but pkgdatadir is unset!')
- elif (pkglibdir == '')
- error('Installing introspection, but pkglibdir is unset!')
- endif
+ assert(not static, 'Currently meson requires a shared library for building girs.')
+ assert(pkgdatadir != '', 'Installing introspection, but pkgdatadir is unset!')
libgvc_gir = gnome.generate_gir(libgvc,
sources: libgvc_gir_sources + libgvc_gir_headers,