mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-07 14:06:00 +01:00
Merge pull request #623 from martinetd/mesonopt
Meson option enhancements
This commit is contained in:
commit
8fc7edd636
3 changed files with 36 additions and 32 deletions
|
@ -27,34 +27,36 @@ backend_files = files(
|
||||||
'x11/backend.c',
|
'x11/backend.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
backend_deps = [
|
||||||
|
wayland_server,
|
||||||
|
egl,
|
||||||
|
gbm,
|
||||||
|
libinput,
|
||||||
|
wlr_render,
|
||||||
|
wlr_protos,
|
||||||
|
drm,
|
||||||
|
pixman,
|
||||||
|
]
|
||||||
|
|
||||||
if host_machine.system().startswith('freebsd')
|
if host_machine.system().startswith('freebsd')
|
||||||
backend_files += files('session/direct-freebsd.c')
|
backend_files += files('session/direct-freebsd.c')
|
||||||
else
|
else
|
||||||
backend_files += files('session/direct.c')
|
backend_files += files('session/direct.c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if systemd.found() and get_option('enable_systemd')
|
if conf_data.get('WLR_HAS_SYSTEMD', false)
|
||||||
backend_files += files('session/logind.c')
|
backend_files += files('session/logind.c')
|
||||||
|
backend_deps += systemd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if elogind.found() and get_option('enable_elogind')
|
if conf_data.get('WLR_HAS_ELOGIND', false)
|
||||||
backend_files += files('session/logind.c')
|
backend_files += files('session/logind.c')
|
||||||
|
backend_deps += elogind
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lib_wlr_backend = static_library(
|
lib_wlr_backend = static_library(
|
||||||
'wlr_backend',
|
'wlr_backend',
|
||||||
backend_files,
|
backend_files,
|
||||||
include_directories: wlr_inc,
|
include_directories: wlr_inc,
|
||||||
dependencies: [
|
dependencies: backend_deps,
|
||||||
wayland_server,
|
|
||||||
egl,
|
|
||||||
gbm,
|
|
||||||
libinput,
|
|
||||||
systemd,
|
|
||||||
elogind,
|
|
||||||
wlr_render,
|
|
||||||
wlr_protos,
|
|
||||||
drm,
|
|
||||||
pixman,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
32
meson.build
32
meson.build
|
@ -65,29 +65,33 @@ xcb_image = dependency('xcb-image')
|
||||||
xcb_render = dependency('xcb-render')
|
xcb_render = dependency('xcb-render')
|
||||||
xcb_icccm = dependency('xcb-icccm', required: false)
|
xcb_icccm = dependency('xcb-icccm', required: false)
|
||||||
x11_xcb = dependency('x11-xcb')
|
x11_xcb = dependency('x11-xcb')
|
||||||
libcap = dependency('libcap', required: false)
|
libcap = dependency('libcap', required: get_option('enable_libcap') == 'true')
|
||||||
systemd = dependency('libsystemd', required: false)
|
systemd = dependency('libsystemd', required: get_option('enable_systemd') == 'true')
|
||||||
elogind = dependency('libelogind', required: false)
|
elogind = dependency('libelogind', required: get_option('enable_elogind') == 'true')
|
||||||
math = cc.find_library('m', required: false)
|
math = cc.find_library('m', required: false)
|
||||||
|
|
||||||
|
exclude_headers = []
|
||||||
|
wlr_parts = []
|
||||||
|
wlr_deps = []
|
||||||
|
|
||||||
if xcb_icccm.found()
|
if xcb_icccm.found()
|
||||||
conf_data.set('WLR_HAS_XCB_ICCCM', true)
|
conf_data.set('WLR_HAS_XCB_ICCCM', true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if libcap.found() and get_option('enable_libcap')
|
if libcap.found() and get_option('enable_libcap') != 'false'
|
||||||
conf_data.set('WLR_HAS_LIBCAP', true)
|
conf_data.set('WLR_HAS_LIBCAP', true)
|
||||||
|
wlr_deps += libcap
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if systemd.found() and get_option('enable_systemd')
|
if systemd.found() and get_option('enable_systemd') != 'false'
|
||||||
conf_data.set('WLR_HAS_SYSTEMD', true)
|
conf_data.set('WLR_HAS_SYSTEMD', true)
|
||||||
|
wlr_deps += systemd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if elogind.found() and get_option('enable_elogind')
|
if elogind.found() and get_option('enable_elogind') != 'false'
|
||||||
conf_data.set('WLR_HAS_ELOGIND', true)
|
conf_data.set('WLR_HAS_ELOGIND', true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exclude_headers = []
|
|
||||||
wlr_parts = []
|
|
||||||
if get_option('enable_xwayland')
|
if get_option('enable_xwayland')
|
||||||
subdir('xwayland')
|
subdir('xwayland')
|
||||||
wlr_parts += [lib_wlr_xwayland]
|
wlr_parts += [lib_wlr_xwayland]
|
||||||
|
@ -117,7 +121,7 @@ wlr_parts += [
|
||||||
lib_wlr_xcursor,
|
lib_wlr_xcursor,
|
||||||
]
|
]
|
||||||
|
|
||||||
wlr_deps = [
|
wlr_deps += [
|
||||||
wayland_server,
|
wayland_server,
|
||||||
wayland_client,
|
wayland_client,
|
||||||
wayland_egl,
|
wayland_egl,
|
||||||
|
@ -133,8 +137,6 @@ wlr_deps = [
|
||||||
xcb,
|
xcb,
|
||||||
xcb_composite,
|
xcb_composite,
|
||||||
x11_xcb,
|
x11_xcb,
|
||||||
libcap,
|
|
||||||
systemd,
|
|
||||||
math,
|
math,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -159,10 +161,10 @@ summary = [
|
||||||
'----------------',
|
'----------------',
|
||||||
'wlroots @0@'.format(meson.project_version()),
|
'wlroots @0@'.format(meson.project_version()),
|
||||||
'',
|
'',
|
||||||
' libcap: @0@'.format(get_option('enable_libcap')),
|
' libcap: @0@'.format(conf_data.get('WLR_HAS_LIBCAP', false)),
|
||||||
' systemd: @0@'.format(get_option('enable_systemd')),
|
' systemd: @0@'.format(conf_data.get('WLR_HAS_SYSTEMD', false)),
|
||||||
' elogind: @0@'.format(get_option('enable_elogind')),
|
' elogind: @0@'.format(conf_data.get('WLR_HAS_ELOGIND', false)),
|
||||||
' xwayland: @0@'.format(get_option('enable_xwayland')),
|
' xwayland: @0@'.format(conf_data.get('WLR_HAS_XWAYLAND', false)),
|
||||||
'----------------',
|
'----------------',
|
||||||
''
|
''
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
option('enable_libcap', type: 'boolean', value: true, description: 'Enable support for capabilities')
|
option('enable_libcap', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Enable support for capabilities')
|
||||||
option('enable_systemd', type: 'boolean', value: true, description: 'Enable support for logind')
|
option('enable_systemd', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Enable support for logind')
|
||||||
option('enable_elogind', type: 'boolean', value: true, description: 'Enable support for logind')
|
option('enable_elogind', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'Enable support for logind')
|
||||||
option('enable_xwayland', type: 'boolean', value: true, description: 'Enable support X11 applications')
|
option('enable_xwayland', type: 'boolean', value: true, description: 'Enable support X11 applications')
|
||||||
|
|
Loading…
Reference in a new issue