diff options
author | Dylan Baker <[email protected]> | 2017-10-30 15:49:37 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2017-12-04 14:36:53 -0800 |
commit | 5a785d51a6d68ec676cea6220f75bad95a3221dc (patch) | |
tree | 2ddfdc42de0bdaa4612e56482aed7c77586cbfec /meson.build | |
parent | 1d36dc674d528b93bec3ff9637adde4ae6492452 (diff) |
meson: build gallium va state tracker
Signed-off-by: Dylan Baker <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 8f0ec75d80b..e7a199faccd 100644 --- a/meson.build +++ b/meson.build @@ -500,6 +500,44 @@ if with_gallium_omx ) endif +dep_va = [] +_va = get_option('gallium-va') +if _va == 'auto' + if not ['linux', 'bsd'].contains(host_machine.system()) + 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 + else + dep_va = dependency('libva', version : '>= 0.38.0', required : false) + with_gallium_va = dep_va.found() + endif +elif _va == 'true' + if not ['linux', 'bsd'].contains(host_machine.system()) + error('VA state tracker can only be built on unix-like OSes.') + elif not (with_platform_x11 or with_platform_drm) + 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) + error('VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.') + endif + dep_va = dependency('libva', version : '>= 0.38.0') + with_gallium_va = true +else + with_gallium_va = false +endif +if with_gallium_va + dep_va = declare_dependency( + compile_args : dep_va.get_pkgconfig_variable('cflags').split() + ) +endif + +va_drivers_path = get_option('va-libs-path') +if va_drivers_path == '' + va_drivers_path = join_paths(get_option('libdir'), 'dri') +endif + gl_pkgconfig_c_flags = [] if with_platform_x11 if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm') @@ -1030,7 +1068,8 @@ if with_platform_x11 dep_xxf86vm = dependency('xxf86vm', required : false) endif if with_any_vk or with_glx == 'dri' or - (with_gallium_vdpau or with_gallium_xvmc or with_gallium_omx) + (with_gallium_vdpau or with_gallium_xvmc or with_gallium_omx or + with_gallium_xa) dep_xcb = dependency('xcb') dep_x11_xcb = dependency('x11-xcb') endif |