build: Add dependency on libdisplay-info

Add a dependency on https://gitlab.freedesktop.org/emersion/libdisplay-info/
to be used for parsing EDIDs for KHR_display HDR support.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
This commit is contained in:
Joshua Ashton 2022-11-25 06:37:19 +00:00 committed by Marge Bot
parent 1ed78dd7ec
commit 2c870bbe20
3 changed files with 22 additions and 0 deletions

View file

@ -1558,6 +1558,17 @@ if dep_zlib.found()
pre_args += '-DHAVE_ZLIB'
endif
if host_machine.system() == 'windows'
dep_display_info = null_dep
else
dep_display_info = dependency('libdisplay-info', version : '>= 0.1.1',
fallback : ['libdisplay-info', 'di_dep'],
required : get_option('display-info'))
if dep_display_info.found()
pre_args += '-DHAVE_LIBDISPLAY_INFO'
endif
endif
dep_zstd = dependency('libzstd', required : get_option('zstd'))
if dep_zstd.found()
pre_args += '-DHAVE_ZSTD'

View file

@ -609,6 +609,12 @@ option(
description : 'Use ZLIB to build driver. Default: enabled'
)
option(
'display-info',
type : 'feature',
description : 'Use libdisplay-info to build driver.'
)
option(
'sse2',
type : 'boolean',

View file

@ -0,0 +1,5 @@
[wrap-git]
directory = libdisplay-info
url = https://gitlab.freedesktop.org/emersion/libdisplay-info
revision = 92b031749c0fe84ef5cdf895067b84a829920e25