diff --git a/meson.build b/meson.build index cf7b271c1e2..c91c028f0eb 100644 --- a/meson.build +++ b/meson.build @@ -134,19 +134,9 @@ endif with_opengl = get_option('opengl') # Default shared glapi off for windows, on elsewhere. -_sg = get_option('shared-glapi') -if _sg == 'true' - _sg = 'enabled' - warning('shared-glapi option "true" deprecated, please use "enabled" instead.') -elif _sg == 'false' - _sg = 'disabled' - warning('shared-glapi option "false" deprecated, please use "disabled" instead.') -endif -if _sg == 'auto' - with_shared_glapi = host_machine.system() != 'windows' -else - with_shared_glapi = _sg == 'enabled' -endif +with_shared_glapi = get_option('shared-glapi') \ + .disable_auto_if(host_machine.system() == 'windows') \ + .allowed() # shared-glapi is required if at least two OpenGL APIs are being built if not with_shared_glapi diff --git a/meson_options.txt b/meson_options.txt index 9d0f2c9bff6..4bfb4595313 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -241,9 +241,7 @@ option( ) option( 'shared-glapi', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false', 'enabled', 'disabled'], + type : 'feature', description : 'Whether to build a shared or static glapi. Defaults to false on Windows, true elsewhere' ) option(