diff --git a/meson.build b/meson.build index 39e04f0de8..ce1fce2b09 100644 --- a/meson.build +++ b/meson.build @@ -962,9 +962,9 @@ if features['sixel'] sources += files('video/out/vo_sixel.c') endif -features += {'posix_shm': false} +features += {'posix-shm': false} if features['posix'] - features += {'posix_shm': cc.has_function('shm_open', prefix: '#include ')} + features += {'posix-shm': cc.has_function('shm_open', prefix: '#include ')} endif spirv_cross = dependency('spirv-cross-c-shared', required: get_option('spirv-cross')) @@ -1006,18 +1006,18 @@ if features['wayland'] subdir(join_paths('video', 'out')) endif -features += {'memfd_create': false} +features += {'memfd-create': false} if features['wayland'] - features += {'memfd_create': cc.has_function('memfd_create', + features += {'memfd-create': cc.has_function('memfd_create', prefix: '#define _GNU_SOURCE\n#include ')} endif -if features['wayland'] and features['memfd_create'] +if features['wayland'] and features['memfd-create'] sources += files('video/out/vo_wlshm.c') endif dmabuf_wayland = get_option('dmabuf-wayland').require( - features['drm'] and features['memfd_create'] and features['wayland'], - error_message: 'drm, memfd_create, or wayland was not found!', + features['drm'] and features['memfd-create'] and features['wayland'], + error_message: 'drm, memfd-create or wayland was not found!', ) features += {'dmabuf-wayland': dmabuf_wayland.allowed()} if features['dmabuf-wayland'] @@ -1282,10 +1282,9 @@ if features['vulkan'] and features['x11'] sources += files('video/out/vulkan/context_xlib.c') endif -features += {'vk_khr_display': cc.has_function('vkCreateDisplayPlaneSurfaceKHR', prefix: '#include ', +features += {'vk-khr-display': cc.has_function('vkCreateDisplayPlaneSurfaceKHR', prefix: '#include ', dependencies: [vulkan])} - -if features['vk_khr_display'] +if features['vk-khr-display'] sources += files('video/out/vulkan/context_display.c') endif diff --git a/video/out/meson.build b/video/out/meson.build index a254e508bb..e2808d68df 100644 --- a/video/out/meson.build +++ b/video/out/meson.build @@ -8,19 +8,19 @@ protocols = [[wl_protocol_dir, 'stable/presentation-time/presentation-time.xml'] wl_protocols_source = [] wl_protocols_headers = [] -features += {'wayland_protocols_1_27': wayland['deps'][2].version().version_compare('>=1.27')} -if features['wayland_protocols_1_27'] +foreach v: ['1.27', '1.31', '1.32'] + features += {'wayland-protocols-' + v.replace('.', '-'): + wayland['deps'][2].version().version_compare('>=' + v)} +endforeach + +if features['wayland-protocols-1-27'] protocols += [[wl_protocol_dir, 'staging/content-type/content-type-v1.xml'], [wl_protocol_dir, 'staging/single-pixel-buffer/single-pixel-buffer-v1.xml']] endif - -features += {'wayland_protocols_1_31': wayland['deps'][2].version().version_compare('>=1.31')} -if features['wayland_protocols_1_31'] +if features['wayland-protocols-1-31'] protocols += [[wl_protocol_dir, 'staging/fractional-scale/fractional-scale-v1.xml']] endif - -features += {'wayland_protocols_1_32': wayland['deps'][2].version().version_compare('>=1.32')} -if features['wayland_protocols_1_32'] +if features['wayland-protocols-1-32'] protocols += [[wl_protocol_dir, 'staging/cursor-shape/cursor-shape-v1.xml'], [wl_protocol_dir, 'unstable/tablet/tablet-unstable-v2.xml']] # required by cursor-shape endif