meson: rename all features with underscores

The convention is to use dashes.
This commit is contained in:
sfan5 2023-08-20 22:40:58 +02:00 committed by Dudemanguy
parent 88d0383a26
commit ecbaf34701
2 changed files with 17 additions and 18 deletions

View File

@ -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 <sys/mman.h>')}
features += {'posix-shm': cc.has_function('shm_open', prefix: '#include <sys/mman.h>')}
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 <sys/mman.h>')}
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 <vulkan/vulkan_core.h>',
features += {'vk-khr-display': cc.has_function('vkCreateDisplayPlaneSurfaceKHR', prefix: '#include <vulkan/vulkan_core.h>',
dependencies: [vulkan])}
if features['vk_khr_display']
if features['vk-khr-display']
sources += files('video/out/vulkan/context_display.c')
endif

View File

@ -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