diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2019-01-29 17:39:44 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2019-02-13 11:22:22 +0100 |
commit | 58a878623b3ae76fd6ac3bac86024e4700e28933 (patch) | |
tree | d4aa74e7391642da5d31b8ec0be5296960bf4ed0 /meson.build | |
parent | d08ec09dde93a4eaac287bc85d025569b9dcc6f4 (diff) |
meson: find dependencies only when necessary
This allows finding dependencies conditionally, only
when the enabled features actually need them.
Also, make sure to require those dependencies when the enabled
features do need them, instead of using "required: false" and
failing later
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 2b398b79..3261cadf 100644 --- a/meson.build +++ b/meson.build @@ -170,8 +170,11 @@ rt_lib = cc.find_library('rt', required : false) # clock_gettime dl_lib = cc.find_library('dl', required : false) pthread_lib = dependency('threads') dbus_dep = dependency('dbus-1') +sdl_dep = dependency('sdl2', required : false) -glib_dep = dependency('glib-2.0', version : '>=2.32.0', required : false) +if get_option('gstreamer') or get_option('pipewire-pulseaudio') + glib_dep = dependency('glib-2.0', version : '>=2.32.0') +endif if get_option('gstreamer') gobject_dep = dependency('gobject-2.0') @@ -201,6 +204,7 @@ if get_option('pipewire-pulseaudio') endif if get_option('pipewire-alsa') + alsa_dep = dependency('alsa') subdir('pipewire-alsa/alsa-plugins') endif |