1wl_req = '>= 1.15' 2wl_client_dep = dependency('wayland-client', version: wl_req, required: get_option('wayland')) 3libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required: get_option('wayland')) 4wl_protocol_dep = dependency('wayland-protocols', version: wl_req, required: get_option('wayland')) 5wl_scanner = find_program('wayland-scanner', required: get_option('wayland')) 6# Also used in ext/wayland 7use_wayland = wl_protocol_dep.found() and wl_client_dep.found() and wl_scanner.found() and libdrm_dep.found() 8 9if use_wayland 10 gstwayland = library('gstwayland-' + api_version, 11 'wayland.c', 12 c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WAYLAND', '-DG_LOG_DOMAIN="GStreamer-Wayland"'], 13 include_directories : [configinc, libsinc], 14 version : libversion, 15 soversion : soversion, 16 darwin_versions : osxversion, 17 install : true, 18 dependencies : [gst_dep, gstvideo_dep, wl_client_dep] 19 ) 20 21 pkg_name = 'gstreamer-wayland-1.0' 22 libraries += [[pkg_name, {'lib': gstwayland}]] 23 pkgconfig.generate(gstwayland, 24 libraries : [gst_dep, gstvideo_dep], 25 variables : pkgconfig_variables, 26 subdirs : pkgconfig_subdirs, 27 name : pkg_name, 28 description : 'GStreamer Wayland support', 29 ) 30 31 gstwayland_dep = declare_dependency(link_with : gstwayland, 32 include_directories : [libsinc], 33 dependencies : [gst_dep, gstvideo_dep]) 34 35 install_headers('wayland.h', subdir: 'gstreamer-1.0/gst/wayland') 36 meson.override_dependency(pkg_name, gstwayland_dep) 37endif 38