diff --git a/meson.build b/meson.build index 429ac249e..9fd96aa16 100644 --- a/meson.build +++ b/meson.build @@ -330,9 +330,9 @@ 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) +sdl_dep = dependency('sdl2', required : get_option('sdl2')) ncurses_dep = dependency('ncurses', required : false) -sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : false) +sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : get_option('sndfile')) if get_option('gstreamer') glib_dep = dependency('glib-2.0', version : '>=2.32.0') diff --git a/meson_options.txt b/meson_options.txt index 200a8fa24..2c2a4683b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -151,3 +151,11 @@ option('udevrulesdir', option('systemd-user-unit-dir', type : 'string', description : 'Directory for user systemd units (defaults to /usr/lib/systemd/user)') +option('sdl2', + description: 'Enable code that depends on SDL 2', + type: 'feature', + value: 'auto') +option('sndfile', + description: 'Enable code that depends on libsndfile', + type: 'feature', + value: 'auto')