diff options
author | Dylan Baker <[email protected]> | 2018-03-06 10:11:38 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-03-07 13:30:53 -0800 |
commit | 34e852d5b50772199797ea839fc8d6b3805633ff (patch) | |
tree | 96f0ab6a38e34ba04084fc4397a454e808f623e4 /meson.build | |
parent | 7598dedfde49391564cdb3d355e7bd98e1880782 (diff) |
meson: Re-add auto option for omx
This re-adds the auto option for omx, without it we default to tizonia
and the build fails almost immediately, this is especially obnoxious
those building a driver that doesn't support the OMX state tracker to
begin with.
v2: - Only define OMX_FOO for auto cases if the dependencies are found.
This fixes building tizonia with auto (Julien, Eric)
CC: Gurkirpal Singh <[email protected]>
Fixes: bb5e27fab6087a5c1528a5faf507acce700e883c
("st/omx/bellagio: Rename st and target directories")
Signed-off-by: Dylan Baker <[email protected]>
Reviewed-by: Jon Turney <[email protected]> (v1)
Reviewed-by: Eric Engestrom <[email protected]>
Tested-by: Julien Isorce <[email protected]>
Tested-by: Karol Herbst <[email protected]> (v1)
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 69 |
1 files changed, 45 insertions, 24 deletions
diff --git a/meson.build b/meson.build index 08b9dd42163..8a17d7f240a 100644 --- a/meson.build +++ b/meson.build @@ -464,42 +464,63 @@ endif _omx = get_option('gallium-omx') if not system_has_kms_drm - if _omx != 'disabled' - error('OMX state tracker can only be built on unix-like OSes.') - else + if ['auto', 'disabled'].contains(_omx) _omx = 'disabled' + else + error('OMX state tracker can only be built on unix-like OSes.') endif elif not (with_platform_x11 or with_platform_drm) - if _omx != 'disabled' - error('OMX state tracker requires X11 or drm platform support.') - else + if ['auto', 'disabled'].contains(_omx) _omx = 'disabled' + else + error('OMX state tracker requires X11 or drm platform support.') endif elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau) - if _omx != 'disabled' - error('OMX state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.') - else + if ['auto', 'disabled'].contains(_omx) _omx = 'disabled' + else + error('OMX state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.') endif endif -with_gallium_omx = _omx != 'disabled' -gallium_omx = _omx +with_gallium_omx = _omx dep_omx = [] dep_omx_other = [] -if gallium_omx == 'bellagio' - pre_args += '-DENABLE_ST_OMX_BELLAGIO' - dep_omx = dependency('libomxil-bellagio') -elif gallium_omx == 'tizonia' - pre_args += '-DENABLE_ST_OMX_TIZONIA' - dep_omx = dependency('libtizonia', version : '>= 0.10.0') - dep_omx_other = [ - dependency('libtizplatform'), - dependency('tizilheaders') - ] +if with_gallium_omx == 'bellagio' or with_gallium_omx == 'auto' + dep_omx = dependency( + 'libomxil-bellagio', required : with_gallium_omx == 'bellagio' + ) + if dep_omx.found() + pre_args += '-DENABLE_ST_OMX_BELLAGIO' + with_gallium_omx = 'bellagio' + endif +endif +if with_gallium_omx == 'tizonia' or with_gallium_omx == 'auto' + if not (with_dri and with_egl) + if with_gallium_omx == 'tizonia' + error('OMX-Tizonia state tracker requires dri and egl') + else + with_gallium_omx == 'disabled' + endif + else + dep_omx = dependency( + 'libtizonia', version : '>= 0.10.0', + required : with_gallium_omx == 'tizonia', + ) + dep_omx_other = [ + dependency('libtizplatform', required : with_gallium_omx == 'tizonia'), + dependency('tizilheaders', required : with_gallium_omx == 'tizonia'), + ] + if dep_omx.found() and dep_omx_other[0].found() and dep_omx_other[1].found() + pre_args += '-DENABLE_ST_OMX_TIZONIA' + with_gallium_omx = 'tizonia' + else + with_gallium_omx = 'disabled' + endif + endif endif omx_drivers_path = get_option('omx-libs-path') -if with_gallium_omx +if with_gallium_omx != 'disabled' # Figure out where to put the omx driver. # FIXME: this could all be vastly simplified by adding a 'defined_variable' # argument to meson's get_pkgconfig_variable method. @@ -1193,8 +1214,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 or - with_gallium_xa)) + (with_gallium_vdpau or with_gallium_xvmc or with_gallium_va or + with_gallium_omx != 'disabled')) dep_xcb = dependency('xcb') dep_x11_xcb = dependency('x11-xcb') endif |