diff options
author | Matthew Waters <matthew@centricular.com> | 2016-11-17 15:15:18 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-11-17 15:16:18 +1100 |
commit | b69dadcc61683e151a2baeea22f7088ef024039e (patch) | |
tree | 2a8a22215a68df1c26c18202fef8a98ba23333d1 /gst-libs/gst | |
parent | 39b59beace94549c63ccb71a09eaef3fd907a83a (diff) |
meson: wayland: move dep checks to the lib
Moves them closer to where they are used. We don't want every check in
the main meson.build file.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/meson.build | 4 | ||||
-rw-r--r-- | gst-libs/gst/wayland/meson.build | 34 |
2 files changed, 23 insertions, 15 deletions
diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build index b5e45724a..2ea25bcd8 100644 --- a/gst-libs/gst/meson.build +++ b/gst-libs/gst/meson.build @@ -10,7 +10,5 @@ subdir('interfaces') subdir('mpegts') subdir('player') subdir('video') -if use_wayland - subdir('wayland') -endif +subdir('wayland') subdir('gl') diff --git a/gst-libs/gst/wayland/meson.build b/gst-libs/gst/wayland/meson.build index 634d2ddcb..e9a88c927 100644 --- a/gst-libs/gst/wayland/meson.build +++ b/gst-libs/gst/wayland/meson.build @@ -1,13 +1,23 @@ -gstwayland = library('gstwayland-' + api_version, - 'wayland.c', - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], - include_directories : [configinc, libsinc], - version : libversion, - soversion : soversion, - install : true, - dependencies : [gst_dep, gstvideo_dep] -) +wl_req = '>= 1.4' +wl_client_dep = dependency('wayland-client', version: wl_req, required: false) +libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required: false) +wl_protocol_dep = dependency('wayland-protocols', version: wl_req, + required: false) +wl_scanner = find_program('wayland-scanner') +use_wayland = wl_protocol_dep.found() and wl_client_dep.found() and wl_scanner.found() and libdrm_dep.found() -gstwayland_dep = declare_dependency(link_with : gstwayland, - include_directories : [libsinc], - dependencies : [gst_dep, gstvideo_dep]) +if use_wayland + gstwayland = library('gstwayland-' + api_version, + 'wayland.c', + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + include_directories : [configinc, libsinc], + version : libversion, + soversion : soversion, + install : true, + dependencies : [gst_dep, gstvideo_dep] + ) + + gstwayland_dep = declare_dependency(link_with : gstwayland, + include_directories : [libsinc], + dependencies : [gst_dep, gstvideo_dep]) +endif |