Use feature options for libcap/logind
We now use a combo choice between systemd/elogind as they are mutually exclusive anyway.
This commit is contained in:
parent
3fa3dca6d5
commit
94ed2fc7bb
|
@ -44,9 +44,9 @@ else
|
|||
backend_files += files('session/direct.c')
|
||||
endif
|
||||
|
||||
if conf_data.get('WLR_HAS_SYSTEMD', false)
|
||||
if logind.found()
|
||||
backend_files += files('session/logind.c')
|
||||
backend_deps += systemd
|
||||
backend_deps += logind
|
||||
endif
|
||||
|
||||
if conf_data.get('WLR_HAS_X11_BACKEND', false)
|
||||
|
@ -58,11 +58,6 @@ if conf_data.get('WLR_HAS_X11_BACKEND', false)
|
|||
backend_deps += xcb_xkb
|
||||
endif
|
||||
|
||||
if conf_data.get('WLR_HAS_ELOGIND', false)
|
||||
backend_files += files('session/logind.c')
|
||||
backend_deps += elogind
|
||||
endif
|
||||
|
||||
lib_wlr_backend = static_library(
|
||||
'wlr_backend',
|
||||
backend_files,
|
||||
|
|
17
meson.build
17
meson.build
|
@ -62,27 +62,22 @@ libinput = dependency('libinput', version: '>=1.7.0')
|
|||
xkbcommon = dependency('xkbcommon')
|
||||
udev = dependency('libudev')
|
||||
pixman = dependency('pixman-1')
|
||||
libcap = dependency('libcap', required: get_option('enable-libcap') == 'true')
|
||||
systemd = dependency('libsystemd', required: get_option('enable-systemd') == 'true')
|
||||
elogind = dependency('libelogind', required: get_option('enable-elogind') == 'true')
|
||||
libcap = dependency('libcap', required: get_option('libcap'))
|
||||
logind = dependency('lib' + get_option('logind-provider'), required: get_option('logind'))
|
||||
math = cc.find_library('m', required: false)
|
||||
|
||||
exclude_headers = []
|
||||
wlr_parts = []
|
||||
wlr_deps = []
|
||||
|
||||
if libcap.found() and get_option('enable-libcap') != 'false'
|
||||
if libcap.found()
|
||||
conf_data.set('WLR_HAS_LIBCAP', true)
|
||||
wlr_deps += libcap
|
||||
endif
|
||||
|
||||
if systemd.found() and get_option('enable-systemd') != 'false'
|
||||
conf_data.set('WLR_HAS_SYSTEMD', true)
|
||||
wlr_deps += systemd
|
||||
endif
|
||||
|
||||
if elogind.found() and get_option('enable-elogind') != 'false'
|
||||
conf_data.set('WLR_HAS_ELOGIND', true)
|
||||
if logind.found()
|
||||
conf_data.set('WLR_HAS_' + get_option('logind-provider').to_upper(), true)
|
||||
wlr_deps += logind
|
||||
endif
|
||||
|
||||
if get_option('enable-x11_backend') or get_option('enable-xwayland')
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
option('enable-libcap', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Enable support for capabilities')
|
||||
option('enable-systemd', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Enable support for logind')
|
||||
option('enable-elogind', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Enable support for logind')
|
||||
option('enable-xcb_errors', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Use xcb-errors util library')
|
||||
option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support X11 applications')
|
||||
option('enable-x11_backend', type: 'boolean', value: true, description: 'Enable X11 backend')
|
||||
|
|
Loading…
Reference in New Issue