summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@imgtec.com>2017-12-07 16:03:22 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2018-03-20 16:57:23 +0000
commita731133c91fcb29233c9883760340eba10c98c71 (patch)
treeafa49f0e94a234a08fc96ae8f927a7f9264057d6 /meson.build
parent672467cb5960ea094e708c3a857230fbaf7f42f5 (diff)
meson: dedup gallium-va logic
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (cherry picked from commit fa5d616bf907bedda6904cdff98832d9c8c59770)
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build38
1 files changed, 18 insertions, 20 deletions
diff --git a/meson.build b/meson.build
index fb09300eb2f..08adc952171 100644
--- a/meson.build
+++ b/meson.build
@@ -513,34 +513,32 @@ if with_gallium_omx
)
endif
-dep_va = []
_va = get_option('gallium-va')
-if _va == 'auto'
- if not system_has_kms_drm
- with_gallium_va = false
- elif not with_platform_x11
- with_gallium_va = false
- elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
- with_gallium_va = false
+if not system_has_kms_drm
+ if _va == 'true'
+ error('VA state tracker can only be built on unix-like OSes.')
else
- dep_va = dependency('libva', version : '>= 0.38.0', required : false)
- with_gallium_va = dep_va.found()
+ _va = 'false'
endif
-elif _va == 'true'
- if not system_has_kms_drm
- error('VA state tracker can only be built on DRM/KMS OSes.')
- elif not (with_platform_x11 or with_platform_drm)
+elif not (with_platform_x11 or with_platform_drm)
+ if _va == 'true'
error('VA state tracker requires X11 or drm or wayland platform support.')
- with_gallium_va = false
- elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
+ else
+ _va = 'false'
+ endif
+elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
+ if _va == 'true'
error('VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.')
+ else
+ _va = 'false'
endif
- dep_va = dependency('libva', version : '>= 0.38.0')
- with_gallium_va = true
-else
- with_gallium_va = false
+elif _va == 'auto'
+ _va = 'true'
endif
+with_gallium_va = _va == 'true'
+dep_va = []
if with_gallium_va
+ dep_va = dependency('libva', version : '>= 0.38.0')
dep_va = declare_dependency(
compile_args : run_command(prog_pkgconfig, ['libva', '--cflags']).stdout().split()
)