commit
8ecf9224f5
@ -0,0 +1,44 @@
|
||||
x11_libs = []
|
||||
x11_required = [
|
||||
'xcb',
|
||||
'x11-xcb',
|
||||
]
|
||||
x11_optional = [
|
||||
'xcb-xkb',
|
||||
]
|
||||
|
||||
foreach lib : x11_required
|
||||
dep = dependency(lib, required: get_option('x11-backend'))
|
||||
if not dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
x11_libs += dep
|
||||
endforeach
|
||||
|
||||
foreach lib : x11_optional
|
||||
dep = dependency(lib, required: get_option(lib))
|
||||
if dep.found()
|
||||
x11_libs += dep
|
||||
conf_data.set('WLR_HAS_' + lib.underscorify().to_upper(), true)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
lib_wlr_backend_x11 = static_library(
|
||||
'wlr_backend_x11',
|
||||
files(
|
||||
'backend.c',
|
||||
'input_device.c',
|
||||
'output.c',
|
||||
),
|
||||
include_directories: wlr_inc,
|
||||
dependencies: [
|
||||
wayland_server,
|
||||
pixman,
|
||||
xkbcommon,
|
||||
x11_libs,
|
||||
],
|
||||
)
|
||||
|
||||
backend_parts += lib_wlr_backend_x11
|
||||
conf_data.set('WLR_HAS_X11_BACKEND', true)
|
@ -1,80 +1,102 @@
|
||||
threads = dependency('threads')
|
||||
wayland_cursor = dependency('wayland-cursor')
|
||||
|
||||
libpng = dependency('libpng', required: false)
|
||||
|
||||
# These versions correspond to ffmpeg 4.0
|
||||
libavutil = dependency('libavutil', version: '>=56.14.100', required: false)
|
||||
libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false)
|
||||
libavformat = dependency('libavformat', version: '>=58.12.100', required: false)
|
||||
|
||||
if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
|
||||
libavutil = disabler()
|
||||
# Small hack until https://github.com/mesonbuild/meson/pull/3386/ is merged
|
||||
foreach dep : ['libpng', 'libavutil', 'libavcodec', 'libavformat']
|
||||
if not get_variable(dep).found()
|
||||
set_variable(dep, disabler())
|
||||
endif
|
||||
endforeach
|
||||
|
||||
executable('simple', 'simple.c', dependencies: wlroots)
|
||||
executable('pointer', 'pointer.c', dependencies: wlroots)
|
||||
executable('touch', 'touch.c', 'cat.c', dependencies: wlroots)
|
||||
executable('tablet', 'tablet.c', dependencies: wlroots)
|
||||
executable('rotation', 'rotation.c', 'cat.c', dependencies: wlroots)
|
||||
executable('multi-pointer', 'multi-pointer.c', dependencies: wlroots)
|
||||
executable('output-layout', 'output-layout.c', 'cat.c', dependencies: wlroots)
|
||||
|
||||
executable(
|
||||
'screenshot',
|
||||
'screenshot.c',
|
||||
dependencies: [wayland_client, wlr_protos, wlroots]
|
||||
)
|
||||
|
||||
executable(
|
||||
'idle',
|
||||
'idle.c',
|
||||
dependencies: [wayland_client, wlr_protos, wlroots, threads]
|
||||
)
|
||||
|
||||
executable(
|
||||
'idle-inhibit',
|
||||
'idle-inhibit.c',
|
||||
dependencies: [wayland_client, wlr_protos, wlroots, threads]
|
||||
)
|
||||
|
||||
executable(
|
||||
'layer-shell',
|
||||
'layer-shell.c',
|
||||
dependencies: [wayland_cursor, wayland_client, wlr_protos, wlroots]
|
||||
)
|
||||
|
||||
executable(
|
||||
'input-inhibitor',
|
||||
'input-inhibitor.c',
|
||||
dependencies: [wayland_cursor, wayland_client, wlr_protos, wlroots]
|
||||
)
|
||||
|
||||
executable(
|
||||
'gamma-control',
|
||||
'gamma-control.c',
|
||||
dependencies: [wayland_cursor, wayland_client, wlr_protos, wlroots]
|
||||
)
|
||||
|
||||
if libavutil.found() and libavcodec.found() and libavformat.found()
|
||||
executable(
|
||||
'dmabuf-capture',
|
||||
'dmabuf-capture.c',
|
||||
dependencies: [wayland_client, wlr_protos, libavutil, libavcodec,
|
||||
libavformat, wlroots, threads ]
|
||||
)
|
||||
if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
|
||||
libavutil = disabler()
|
||||
endif
|
||||
|
||||
if libpng.found()
|
||||
executable(
|
||||
'screencopy',
|
||||
'screencopy.c',
|
||||
dependencies: [wayland_client, wlr_protos, wlroots, libpng]
|
||||
)
|
||||
endif
|
||||
examples = {
|
||||
'simple': {
|
||||
'src': 'simple.c',
|
||||
'dep': wlroots,
|
||||
},
|
||||
'pointer': {
|
||||
'src': 'pointer.c',
|
||||
'dep': wlroots,
|
||||
},
|
||||
'touch': {
|
||||
'src': ['touch.c', 'cat.c'],
|
||||
'dep': wlroots,
|
||||
},
|
||||
'tablet': {
|
||||
'src': 'tablet.c',
|
||||
'dep': wlroots,
|
||||
},
|
||||
'rotation': {
|
||||
'src': ['rotation.c', 'cat.c'],
|
||||
'dep': wlroots,
|
||||
},
|
||||
'multi-pointer': {
|
||||
'src': 'multi-pointer.c',
|
||||
'dep': wlroots,
|
||||
},
|
||||
'output-layout': {
|
||||
'src': ['output-layout.c', 'cat.c'],
|
||||
'dep': wlroots,
|
||||
},
|
||||
'screenshot': {
|
||||
'src': 'screenshot.c',
|
||||
'dep': [wayland_client, wlr_protos, wlroots],
|
||||
},
|
||||
'idle': {
|
||||
'src': 'idle.c',
|
||||
'dep': [wayland_client, wlr_protos, wlroots, threads],
|
||||
},
|
||||
'idle-inhibit': {
|
||||
'src': 'idle-inhibit.c',
|
||||
'dep': [wayland_client, wlr_protos, wlroots],
|
||||
},
|
||||
'layer-shell': {
|
||||
'src': 'layer-shell.c',
|
||||
'dep': [wayland_client, wayland_cursor, wlr_protos, wlroots],
|
||||
},
|
||||
'input-inhibitor': {
|
||||
'src': 'input-inhibitor.c',
|
||||
'dep': [wayland_client, wayland_cursor, wlr_protos, wlroots],
|
||||
},
|
||||
'gamma-control': {
|
||||
'src': 'gamma-control.c',
|
||||
'dep': [wayland_client, wayland_cursor, wlr_protos, wlroots],
|
||||
},
|
||||
'dmabuf-capture': {
|
||||
'src': 'dmabuf-capture.c',
|
||||
'dep': [
|
||||
libavcodec,
|
||||
libavformat,
|
||||
libavutil,
|
||||
threads,
|
||||
wayland_client,
|
||||
wlr_protos,
|
||||
wlroots,
|
||||
],
|
||||
},
|
||||
'screencopy': {
|
||||
'src': 'screencopy.c',
|
||||
'dep': [libpng, wayland_client, wlr_protos, wlroots],
|
||||
},
|
||||
'toplevel-decoration': {
|
||||
'src': 'toplevel-decoration.c',
|
||||
'dep': [wayland_client, wlr_protos, wlroots],
|
||||
},
|
||||
}
|
||||
|
||||
foreach name, info : examples
|
||||
executable(
|
||||
'toplevel-decoration',
|
||||
'toplevel-decoration.c',
|
||||
dependencies: [wayland_client, wlr_protos, wlroots]
|
||||
name,
|
||||
info.get('src'),
|
||||
dependencies: info.get('dep'),
|
||||
build_by_default: get_option('examples'),
|
||||
)
|
||||
endforeach
|
||||
|
@ -0,0 +1,16 @@
|
||||
install_headers(
|
||||
'drm.h',
|
||||
'headless.h',
|
||||
'interface.h',
|
||||
'libinput.h',
|
||||
'multi.h',
|
||||
'session.h',
|
||||
'wayland.h',
|
||||
subdir: 'wlr/backend',
|
||||
)
|
||||
|
||||
if conf_data.get('WLR_HAS_X11_BACKEND', false)
|
||||
install_headers('x11.h', subdir: 'wlr/backend')
|
||||
endif
|
||||
|
||||
subdir('session')
|
@ -0,0 +1 @@
|
||||
install_headers('interface.h', subdir: 'wlr/backend/session')
|
@ -0,0 +1,19 @@
|
||||
#ifndef WLR_CONFIG_H
|
||||
#define WLR_CONFIG_H
|
||||
|
||||
#mesondefine WLR_HAS_LIBCAP
|
||||
|
||||
#mesondefine WLR_HAS_SYSTEMD
|
||||
#mesondefine WLR_HAS_ELOGIND
|
||||
|
||||
#mesondefine WLR_HAS_X11_BACKEND
|
||||
|
||||
#mesondefine WLR_HAS_XWAYLAND
|
||||
|
||||
#mesondefine WLR_HAS_XCB_ERRORS
|
||||
#mesondefine WLR_HAS_XCB_ICCCM
|
||||
#mesondefine WLR_HAS_XCB_XKB
|
||||
|
||||
#mesondefine WLR_HAS_POSIX_FALLOCATE
|
||||
|
||||
#endif
|
@ -0,0 +1,10 @@
|
||||
install_headers(
|
||||
'wlr_input_device.h',
|
||||
'wlr_keyboard.h',
|
||||
'wlr_output.h',
|
||||
'wlr_pointer.h',
|
||||
'wlr_tablet_pad.h',
|
||||
'wlr_tablet_tool.h',
|
||||
'wlr_touch.h',
|
||||
subdir: 'wlr/interfaces',
|
||||
)
|
@ -0,0 +1,9 @@
|
||||
install_headers(
|
||||
'dmabuf.h',
|
||||
'egl.h',
|
||||
'gles2.h',
|
||||
'interface.h',
|
||||
'wlr_renderer.h',
|
||||
'wlr_texture.h',
|
||||
subdir: 'wlr/render'
|
||||
)
|
@ -0,0 +1,42 @@
|
||||
install_headers(
|
||||
'wlr_box.h',
|
||||
'wlr_buffer.h',
|
||||
'wlr_compositor.h',
|
||||
'wlr_cursor.h',
|
||||
'wlr_data_device.h',
|
||||
'wlr_export_dmabuf_v1.h',
|
||||
'wlr_gamma_control.h',
|
||||
'wlr_gamma_control_v1.h',
|
||||
'wlr_idle.h',
|
||||
'wlr_idle_inhibit_v1.h',
|
||||
'wlr_input_device.h',
|
||||
'wlr_input_inhibitor.h',
|
||||
'wlr_keyboard.h',
|
||||
'wlr_layer_shell.h',
|
||||
'wlr_linux_dmabuf_v1.h',
|
||||
'wlr_list.h',
|
||||
'wlr_matrix.h',
|
||||
'wlr_output.h',
|
||||
'wlr_output_damage.h',
|
||||
'wlr_output_layout.h',
|
||||
'wlr_pointer.h',
|
||||
'wlr_primary_selection.h',
|
||||
'wlr_region.h',
|
||||
'wlr_screencopy_v1.h',
|
||||
'wlr_screenshooter.h',
|
||||
'wlr_seat.h',
|
||||
'wlr_server_decoration.h',
|
||||
'wlr_surface.h',
|
||||
'wlr_tablet_pad.h',
|
||||
'wlr_tablet_tool.h',
|
||||
'wlr_tablet_v2.h',
|
||||
'wlr_touch.h',
|
||||
'wlr_virtual_keyboard_v1.h',
|
||||
'wlr_wl_shell.h',
|
||||
'wlr_xcursor_manager.h',
|
||||
'wlr_xdg_decoration_v1.h',
|
||||
'wlr_xdg_output.h',
|
||||
'wlr_xdg_shell.h',
|
||||
'wlr_xdg_shell_v6.h',
|
||||
subdir: 'wlr/types',
|
||||
)
|
@ -0,0 +1,6 @@
|
||||
install_headers(
|
||||
'edges.h',
|
||||
'log.h',
|
||||
'region.h',
|
||||
subdir: 'wlr/util',
|
||||
)
|
@ -0,0 +1,16 @@
|
||||
#ifndef WLR_VERSION_H
|
||||
#define WLR_VERSION_H
|
||||
|
||||
#mesondefine WLR_VERSION_STR
|
||||
|
||||
#mesondefine WLR_VERSION_MAJOR
|
||||
#mesondefine WLR_VERSION_MINOR
|
||||
#mesondefine WLR_VERSION_MICRO
|
||||
|
||||
#define WLR_VERSION_NUM ((WLR_VERSION_MAJOR << 16) | (WLR_VERSION_MINOR << 8) | WLR_VERSION_MICRO)
|
||||
|
||||
#mesondefine WLR_VERSION_API_CURRENT
|
||||
#mesondefine WLR_VERSION_API_REVISION
|
||||
#mesondefine WLR_VERSION_API_AGE
|
||||
|
||||
#endif
|
@ -1,8 +1,10 @@
|
||||
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')
|
||||
option('enable-rootston', type: 'boolean', value: true, description: 'Build the rootston example compositor')
|
||||
option('enable-examples', type: 'boolean', value: true, description: 'Build example applications')
|
||||
option('libcap', type: 'feature', value: 'auto', description: 'Enable support for rootless session via capabilities (cap_sys_admin)')
|
||||
option('logind', type: 'feature', value: 'auto', description: 'Enable support for rootless session via logind')
|
||||
option('logind-provider', type: 'combo', choices: ['systemd', 'elogind'], value: 'systemd', description: 'Provider of logind support library')
|
||||
option('xcb-errors', type: 'feature', value: 'auto', description: 'Use xcb-errors util library')
|
||||
option('xcb-icccm', type: 'feature', value: 'auto', description: 'Use xcb-icccm util library')
|
||||
option('xcb-xkb', type: 'feature', value: 'auto', description: 'Use xcb-xkb util library')
|
||||
option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')
|
||||
option('x11-backend', type: 'feature', value: 'auto', description: 'Enable X11 backend')
|
||||
option('rootston', type: 'boolean', value: true, description: 'Build the rootston example compositor')
|
||||
option('examples', type: 'boolean', value: true, description: 'Build example applications')
|
||||
|
Loading…
Reference in new issue