diff options
author | Dylan Baker <[email protected]> | 2018-06-21 08:28:36 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-06-22 09:51:11 -0700 |
commit | d9a8008a93d87287b696627ea6dd01b278b6d579 (patch) | |
tree | 4302df295e3c46e0416bb2eecf3c8d568be95fe7 /meson.build | |
parent | ca59c3906d6b416a2d44fd5ad0c39e2b9c6325d8 (diff) |
meson: Correct behavior of vdpau=auto
Currently if vdpau is set to auto, it will be disabled only in cases
where gallium is disabled or the host OS is not supported (mac, haiku,
windows). However on (for example) Linux if libvdpau is not installed
then the build will error because of the unmet dependency. This corrects
auto to do the right thing, and not error if libvdpau is not installed.
Fixes: 992af0a4b8224bdb4809e01c2f00d2f32546aee5
("meson: dedup gallium-vdpau logic")
Signed-off-by: Dylan Baker <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/meson.build b/meson.build index a2d59776c05..429865c9442 100644 --- a/meson.build +++ b/meson.build @@ -398,16 +398,17 @@ elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or else _vdpau = 'false' endif -elif _vdpau == 'auto' - _vdpau = 'true' endif -with_gallium_vdpau = _vdpau == 'true' dep_vdpau = null_dep -if with_gallium_vdpau - dep_vdpau = dependency('vdpau', version : '>= 1.1') - dep_vdpau = declare_dependency( - compile_args : run_command(prog_pkgconfig, ['vdpau', '--cflags']).stdout().split() - ) +with_gallium_vdpau = false +if _vdpau != 'false' + dep_vdpau = dependency('vdpau', version : '>= 1.1', required : _vdpau == 'true') + if dep_vdpau.found() + dep_vdpau = declare_dependency( + compile_args : run_command(prog_pkgconfig, ['vdpau', '--cflags']).stdout().split() + ) + with_gallium_vdpau = true + endif endif if with_gallium_vdpau |