mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
build: add an option to control gpu-next
Also simplify meson logic
This commit is contained in:
parent
1ea74f10a7
commit
10136e77a3
20
meson.build
20
meson.build
@ -911,20 +911,20 @@ endif
|
||||
|
||||
libplacebo = dependency('libplacebo', version: '>=4.157.0', required: get_option('libplacebo'))
|
||||
features += {'libplacebo': libplacebo.found()}
|
||||
features += {'libplacebo-next': false}
|
||||
if features['libplacebo']
|
||||
dependencies += libplacebo
|
||||
sources += files('video/out/placebo/ra_pl.c',
|
||||
'video/out/placebo/utils.c')
|
||||
pl_api_ver = libplacebo.version().split('.')[1]
|
||||
if pl_api_ver.version_compare('>=264')
|
||||
features += {'libplacebo-next': true}
|
||||
message('libplacebo v5.264.0+ found! Enabling vo_gpu_next.')
|
||||
sources += files('video/out/vo_gpu_next.c',
|
||||
'video/out/gpu_next/context.c')
|
||||
else
|
||||
message('libplacebo v5.264.0+ not found! Disabling vo_gpu_next.')
|
||||
endif
|
||||
endif
|
||||
|
||||
libplacebo_next = get_option('libplacebo-next').require(
|
||||
features['libplacebo'] and libplacebo.version().version_compare('>=5.264.0'),
|
||||
error_message: 'libplacebo v5.264.0+ was not found!',
|
||||
)
|
||||
features += {'libplacebo-next': libplacebo_next.allowed()}
|
||||
if features['libplacebo-next']
|
||||
sources += files('video/out/vo_gpu_next.c',
|
||||
'video/out/gpu_next/context.c')
|
||||
endif
|
||||
|
||||
sdl2_video = get_option('sdl2-video').require(
|
||||
|
@ -75,6 +75,7 @@ option('gl-win32', type: 'feature', value: 'auto', description: 'OpenGL Win32 Ba
|
||||
option('gl-x11', type: 'feature', value: 'disabled', description: 'OpenGL X11/GLX (deprecated/legacy)')
|
||||
option('jpeg', type: 'feature', value: 'auto', description: 'JPEG support')
|
||||
option('libplacebo', type: 'feature', value: 'auto', description: 'libplacebo support')
|
||||
option('libplacebo-next', type: 'feature', value: 'auto', description: 'gpu-next video output')
|
||||
option('rpi', type: 'feature', value: 'disabled', description: 'Raspberry Pi support')
|
||||
option('sdl2-video', type: 'feature', value: 'auto', description: 'SDL2 video output')
|
||||
option('shaderc', type: 'feature', value: 'auto', description: 'libshaderc SPIR-V compiler')
|
||||
|
2
wscript
2
wscript
@ -779,7 +779,7 @@ video_output_features = [
|
||||
'desc': 'libplacebo support',
|
||||
'func': check_pkg_config('libplacebo >= 4.157.0'),
|
||||
}, {
|
||||
'name': 'libplacebo-next',
|
||||
'name': '--libplacebo-next',
|
||||
'desc': 'libplacebo v5.264.0+, needed for vo_gpu_next',
|
||||
'deps': 'libplacebo',
|
||||
'func': check_preprocessor('libplacebo/config.h', 'PL_API_VER >= 264',
|
||||
|
Loading…
Reference in New Issue
Block a user