mirror of
https://github.com/brl/mutter.git
synced 2024-11-20 23:20:41 -05:00
meson: Add optional libsystemd dependency
To utilize the API provided by libsystemd it would be better to create a separate HAVE_LIBSYSTEMD configuration option instead of having to rely on HAVE_NATIVE_BACKEND. For now this will be utilized for getting the control group of a MetaWindow. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1960>
This commit is contained in:
parent
5ffd77c36b
commit
4a0c86ea4c
@ -34,6 +34,9 @@
|
||||
/* Building with libwacom for advanced tablet management */
|
||||
#mesondefine HAVE_LIBWACOM
|
||||
|
||||
/* Building with libsystemd */
|
||||
#mesondefine HAVE_LIBSYSTEMD
|
||||
|
||||
/* Define if you want to enable the native (KMS) backend based on systemd */
|
||||
#mesondefine HAVE_NATIVE_BACKEND
|
||||
|
||||
|
@ -191,13 +191,15 @@ if have_libgudev
|
||||
endif
|
||||
endif
|
||||
|
||||
have_libsystemd = get_option('systemd')
|
||||
libsystemd_dep = dependency('libsystemd', required: have_libsystemd)
|
||||
|
||||
have_native_backend = get_option('native_backend')
|
||||
if have_native_backend
|
||||
libdrm_dep = dependency('libdrm')
|
||||
libgbm_dep = dependency('gbm', version: gbm_req)
|
||||
libinput_dep = dependency('libinput', version: libinput_req)
|
||||
|
||||
libsystemd_dep = dependency('libsystemd', required: false)
|
||||
if libsystemd_dep.found()
|
||||
logind_provider_dep = libsystemd_dep
|
||||
else
|
||||
@ -389,6 +391,7 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
|
||||
cdata.set('HAVE_EGL', have_egl)
|
||||
cdata.set('HAVE_WAYLAND', have_wayland)
|
||||
cdata.set('HAVE_LIBSYSTEMD', have_libsystemd)
|
||||
cdata.set('HAVE_NATIVE_BACKEND', have_native_backend)
|
||||
cdata.set('HAVE_REMOTE_DESKTOP', have_remote_desktop)
|
||||
cdata.set('HAVE_EGL_DEVICE', have_egl_device)
|
||||
|
@ -39,6 +39,12 @@ option('wayland',
|
||||
description: 'Enable Wayland support'
|
||||
)
|
||||
|
||||
option('systemd',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Enable systemd support'
|
||||
)
|
||||
|
||||
option('native_backend',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
@ -118,6 +118,12 @@ if have_wayland
|
||||
]
|
||||
endif
|
||||
|
||||
if have_libsystemd
|
||||
mutter_pkg_private_deps += [
|
||||
libsystemd_dep,
|
||||
]
|
||||
endif
|
||||
|
||||
if have_native_backend
|
||||
mutter_pkg_private_deps += [
|
||||
libdrm_dep,
|
||||
|
Loading…
Reference in New Issue
Block a user