meson: Make libdisplay_info a feature option

Some features depend on libdisplay-info, and making it a feature
option should increase its visibility and adoption.

This makes it required when building with "-Dauto_features=enabled",
unless explicitly disabled with "-Dlibdisplay_info=disabled".

If "-Dauto_features=enabled" is not set, everything remains the
same.

In the future, the libdisplay_info option can be made "enabled" by
default so that it would always be required unless explicitly
disabled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3582>
This commit is contained in:
Dor Askayo 2024-02-11 01:26:21 +02:00 committed by Marge Bot
parent e31c47877a
commit 868fbe622b
3 changed files with 7 additions and 7 deletions

View File

@ -324,7 +324,7 @@ check-code-style:
-Degl_device=true
-Dwayland_eglstream=true
-Dcatch=true
-Dlibdisplay_info=true
-Dlibdisplay_info=enabled
.build-mutter:
extends:

View File

@ -168,10 +168,9 @@ if have_x11_client
xau_dep = dependency('xau')
endif
have_libdisplay_info = get_option('libdisplay_info')
if have_libdisplay_info
libdisplay_info_dep = dependency('libdisplay-info')
endif
use_libdisplay_info = get_option('libdisplay_info')
libdisplay_info_dep = dependency('libdisplay-info', required: use_libdisplay_info)
have_libdisplay_info = libdisplay_info_dep.found()
have_gnome_desktop = get_option('libgnome_desktop')
if have_gnome_desktop

View File

@ -226,7 +226,8 @@ option('catch',
)
option('libdisplay_info',
type: 'boolean',
value: false,
type: 'feature',
value: 'auto',
deprecated: {'true': 'enabled', 'false': 'disabled'},
description: 'Build with or without libdisplay-info'
)