diff options
author | Matthew Waters <matthew@centricular.com> | 2016-09-09 16:55:23 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-09-09 16:55:23 +1000 |
commit | a969048003cc6f9480587d8a12ddcdcb1b483597 (patch) | |
tree | 2d95b2926a22d7ba4fd4c52c2237972c2413095b /ext | |
parent | b3706573dac799f81a8a199fab1db0338d39bf8b (diff) | |
download | gstreamer-plugins-bad-a969048003cc6f9480587d8a12ddcdcb1b483597.tar.gz |
meson: add build files for vulkan
Diffstat (limited to 'ext')
-rw-r--r-- | ext/meson.build | 1 | ||||
-rw-r--r-- | ext/vulkan/meson.build | 71 | ||||
-rw-r--r-- | ext/vulkan/vkconfig.h.meson | 18 |
3 files changed, 90 insertions, 0 deletions
diff --git a/ext/meson.build b/ext/meson.build index 09f4bb001..eaebd8040 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -64,6 +64,7 @@ subdir('srtp') #subdir('timidity') subdir('voaacenc') #subdir('voamrwbenc') +subdir('vulkan') #subdir('wayland') #subdir('webrtcdsp') subdir('webp') diff --git a/ext/vulkan/meson.build b/ext/vulkan/meson.build new file mode 100644 index 000000000..80e162e30 --- /dev/null +++ b/ext/vulkan/meson.build @@ -0,0 +1,71 @@ +vulkan_sources = [ + 'gstvulkan.c', + 'vkbuffermemory.c', + 'vkbufferpool.c', + 'vkdevice.c', + 'vkdisplay.c', + 'vkerror.c', + 'vkimagememory.c', + 'vkinstance.c', + 'vkmemory.c', + 'vkqueue.c', + 'vksink.c', + 'vkswapper.c', + 'vkupload.c', + 'vkutils.c', + 'vkwindow.c', +] + +vulkan_defines = [] +optional_deps = [] + +vulkan_dep = cc.find_library('vulkan', required : false) +has_vulkan_header = cc.has_header('vulkan/vulkan.h') +if vulkan_dep.found() and has_vulkan_header + have_vulkan_windowing = false + + vkconf = configuration_data() + + xcb_dep = dependency('xcb', version : '>=1.10', required : false) + if xcb_dep.found() + vulkan_sources += [ + 'xcb/vkdisplay_xcb.c', + 'xcb/vkwindow_xcb.c', + 'xcb/xcb_event_source.c', + ] + + optional_deps += xcb_dep + have_vulkan_windowing = true + vkconf.set10('GST_VULKAN_HAVE_WINDOW_XCB', 1) + endif + + wayland_client_dep = dependency('wayland-client', version : '>=1.4', required : false) + if wayland_client_dep.found() + vulkan_sources += [ + 'wayland/vkdisplay_wayland.c', + 'wayland/vkwindow_wayland.c', + 'wayland/wayland_event_source.c', + ] + + optional_deps += wayland_client_dep + have_vulkan_windowing = true + vkconf.set10('GST_VULKAN_HAVE_WINDOW_WAYLAND', 1) + endif + + if have_vulkan_windowing + configure_file(input : 'vkconfig.h.meson', + output : 'vkconfig.h', + configuration : vkconf) + + gstvulkan = library('gstvulkan', + vulkan_sources, + c_args : gst_plugins_bad_args + vulkan_defines, + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [vulkan_dep, gstvideo_dep, gstbase_dep] + optional_deps, + install : true, + install_dir : plugins_install_dir, + ) + endif +endif + diff --git a/ext/vulkan/vkconfig.h.meson b/ext/vulkan/vkconfig.h.meson new file mode 100644 index 000000000..bd58da98a --- /dev/null +++ b/ext/vulkan/vkconfig.h.meson @@ -0,0 +1,18 @@ +/* vkconfig.h + * + * This is a generated file. Please modify `configure.ac' + */ + +#ifndef __GST_VULKAN_CONFIG_H__ +#define __GST_VULKAN_CONFIG_H__ + +#include <gst/gst.h> + +G_BEGIN_DECLS + +#mesondefine GST_VULKAN_HAVE_WINDOW_XCB +#mesondefine GST_VULKAN_HAVE_WINDOW_WAYLAND + +G_END_DECLS + +#endif /* __GST_VULKAN_CONFIG_H__ */ |