meson: Use true and false instead of yes and no for tristate options
This allows a user to not care whether they're setting a tristate or a boolean option, which is a nice user facing feature, and something I've personally run into. Suggested-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
@@ -170,7 +170,7 @@ endif
|
|||||||
with_gbm = get_option('gbm')
|
with_gbm = get_option('gbm')
|
||||||
if with_gbm == 'auto' and with_dri # TODO: or gallium
|
if with_gbm == 'auto' and with_dri # TODO: or gallium
|
||||||
with_gbm = host_machine.system() == 'linux'
|
with_gbm = host_machine.system() == 'linux'
|
||||||
elif with_gbm == 'yes'
|
elif with_gbm == 'true'
|
||||||
if not ['linux', 'bsd'].contains(host_machine.system())
|
if not ['linux', 'bsd'].contains(host_machine.system())
|
||||||
error('GBM only supports unix-like platforms')
|
error('GBM only supports unix-like platforms')
|
||||||
endif
|
endif
|
||||||
@@ -182,7 +182,7 @@ endif
|
|||||||
_egl = get_option('egl')
|
_egl = get_option('egl')
|
||||||
if _egl == 'auto'
|
if _egl == 'auto'
|
||||||
with_egl = with_dri and with_shared_glapi and egl_native_platform != ''
|
with_egl = with_dri and with_shared_glapi and egl_native_platform != ''
|
||||||
elif _egl == 'yes'
|
elif _egl == 'true'
|
||||||
if not with_dri
|
if not with_dri
|
||||||
error('EGL requires dri')
|
error('EGL requires dri')
|
||||||
elif not with_shared_glapi
|
elif not with_shared_glapi
|
||||||
@@ -264,7 +264,7 @@ if with_dri3 == 'auto'
|
|||||||
else
|
else
|
||||||
with_dri3 = false
|
with_dri3 = false
|
||||||
endif
|
endif
|
||||||
elif with_dri3 == 'yes'
|
elif with_dri3 == 'true'
|
||||||
with_dri3 = true
|
with_dri3 = true
|
||||||
else
|
else
|
||||||
with_dri3 = false
|
with_dri3 = false
|
||||||
|
@@ -28,7 +28,7 @@ option(
|
|||||||
'dri3',
|
'dri3',
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'yes', 'no'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'enable support for dri3'
|
description : 'enable support for dri3'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
@@ -101,7 +101,7 @@ option(
|
|||||||
'gbm',
|
'gbm',
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'yes', 'no'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'Build support for gbm platform'
|
description : 'Build support for gbm platform'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
@@ -115,7 +115,7 @@ option(
|
|||||||
'egl',
|
'egl',
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'yes', 'no'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'Build support for EGL platform'
|
description : 'Build support for EGL platform'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user