diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2018-10-29 13:27:24 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2018-10-31 07:46:36 +0000 |
commit | 795b352cbaf68ce6f05ab9e9d46d4eff39ffee14 (patch) | |
tree | 5205d28fb92f317f94bf253b084738491a3a71c9 | |
parent | 8693e416bc8208af8132391800b4ae023f0b0740 (diff) |
meson: Use feature for GStreamer and make it auto
Bumping version dependency of meson
Fix minor new warning in meson
-rw-r--r-- | meson.build | 31 | ||||
-rw-r--r-- | meson_options.txt | 4 | ||||
-rw-r--r-- | src/daemon/meson.build | 3 | ||||
-rw-r--r-- | src/meson.build | 2 |
4 files changed, 24 insertions, 16 deletions
diff --git a/meson.build b/meson.build index d8c22aab..2d0bf91c 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('pipewire', 'c', version : '0.2.3', - meson_version : '>= 0.42.0', + meson_version : '>= 0.47.0', default_options : [ 'warning_level=1', 'c_std=gnu99', 'buildtype=debugoptimized' ]) @@ -161,16 +161,25 @@ dl_lib = cc.find_library('dl', required : false) pthread_lib = dependency('threads') dbus_dep = dependency('dbus-1') -if get_option('gstreamer') - glib_dep = dependency('glib-2.0', version : '>=2.32.0') - gobject_dep = dependency('gobject-2.0') - gmodule_dep = dependency('gmodule-2.0') - gio_dep = [dependency('gio-2.0'), dependency('gio-unix-2.0')] - gst_dep = [dependency('gstreamer-1.0'), - dependency('gstreamer-plugins-base-1.0'), - dependency('gstreamer-video-1.0'), - dependency('gstreamer-audio-1.0'), - dependency('gstreamer-allocators-1.0'),] +if not get_option('gstreamer').disabled() + build_gst = true + glib_dep = [dependency('glib-2.0', version : '>=2.32.0', required: get_option('gstreamer'))] + gobject_dep = [dependency('gobject-2.0', required: get_option('gstreamer'))] + gmodule_dep = [dependency('gmodule-2.0', required: get_option('gstreamer'))] + gio_dep = [dependency('gio-2.0', required: get_option('gstreamer')), dependency('gio-unix-2.0', required: get_option('gstreamer'))] + gst_dep = [dependency('gstreamer-1.0', required: get_option('gstreamer')), + dependency('gstreamer-plugins-base-1.0', required: get_option('gstreamer')), + dependency('gstreamer-video-1.0', required: get_option('gstreamer')), + dependency('gstreamer-audio-1.0', required: get_option('gstreamer')), + dependency('gstreamer-allocators-1.0', required: get_option('gstreamer')),] + foreach dep: glib_dep + gobject_dep + gio_dep + gst_dep + if build_gst and not dep.found() + build_gst = false + message('@0@ not found, disabling GStreamer'.format(dep)) + endif + endforeach +else + build_gst = false endif subdir('spa') diff --git a/meson_options.txt b/meson_options.txt index 3d21b2b4..5ea74ff0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,8 +8,8 @@ option('man', value: false) option('gstreamer', description: 'Build GStreamer plugins', - type: 'boolean', - value: false) + type: 'feature', + value: 'auto') option('systemd', description: 'Enable systemd integration', type: 'boolean', diff --git a/src/daemon/meson.build b/src/daemon/meson.build index 8b4f5205..fb694e7c 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -13,12 +13,11 @@ pipewire_c_args = [ '-DG_LOG_DOMAIN=g_log_domain_pipewire', ] -conf_config = configuration_data() conf_install_dir = join_paths(get_option('sysconfdir'), 'pipewire') configure_file(input : 'pipewire.conf.in', output : 'pipewire.conf', - configuration : conf_config, + copy : true, install_dir : conf_install_dir) diff --git a/src/meson.build b/src/meson.build index 0ad7778d..723e2c69 100644 --- a/src/meson.build +++ b/src/meson.build @@ -6,6 +6,6 @@ subdir('tools') subdir('modules') subdir('examples') -if get_option('gstreamer') +if build_gst subdir('gst') endif |