2018-01-07 19:42:33 +00:00
|
|
|
threads = dependency('threads')
|
2020-11-26 12:23:34 +00:00
|
|
|
wayland_egl = dependency('wayland-egl')
|
2018-03-30 21:26:58 +00:00
|
|
|
wayland_cursor = dependency('wayland-cursor')
|
2019-10-08 16:30:49 +00:00
|
|
|
libpng = dependency('libpng', required: false, disabler: true)
|
2021-02-08 12:47:47 +00:00
|
|
|
egl = dependency('egl', required: false, disabler: true)
|
|
|
|
glesv2 = dependency('glesv2', required: false, disabler: true)
|
2018-06-26 08:14:08 +00:00
|
|
|
# These versions correspond to ffmpeg 4.0
|
2019-10-08 16:30:49 +00:00
|
|
|
libavutil = dependency('libavutil', version: '>=56.14.100', required: false, disabler: true)
|
|
|
|
libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false, disabler: true)
|
|
|
|
libavformat = dependency('libavformat', version: '>=58.12.100', required: false, disabler: true)
|
2021-02-23 19:29:58 +00:00
|
|
|
# Only needed for drm_fourcc.h
|
|
|
|
libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes: true)
|
2018-05-27 03:03:29 +00:00
|
|
|
|
2018-10-17 08:55:53 +00:00
|
|
|
# epoll is a separate library in FreeBSD
|
|
|
|
if host_machine.system() == 'freebsd'
|
2019-11-22 07:11:15 +00:00
|
|
|
libepoll = dependency('epoll-shim')
|
2018-10-17 08:55:53 +00:00
|
|
|
else
|
2019-11-22 07:11:15 +00:00
|
|
|
libepoll = dependency('', required: false)
|
2018-10-17 08:55:53 +00:00
|
|
|
endif
|
|
|
|
|
2019-10-08 16:33:19 +00:00
|
|
|
# Check if libavutil is found because of https://github.com/mesonbuild/meson/issues/6010
|
|
|
|
if libavutil.found() and not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
|
2018-08-24 07:35:02 +00:00
|
|
|
libavutil = disabler()
|
2018-06-26 05:22:15 +00:00
|
|
|
endif
|
|
|
|
|
2021-04-09 02:48:01 +00:00
|
|
|
wlr_gles2_renderer = []
|
|
|
|
if not features['gles2-renderer']
|
|
|
|
wlr_gles2_renderer = disabler()
|
|
|
|
endif
|
|
|
|
|
2019-11-22 07:11:15 +00:00
|
|
|
compositors = {
|
2018-08-24 07:35:02 +00:00
|
|
|
'simple': {
|
|
|
|
'src': 'simple.c',
|
|
|
|
},
|
|
|
|
'pointer': {
|
|
|
|
'src': 'pointer.c',
|
|
|
|
},
|
|
|
|
'touch': {
|
|
|
|
'src': ['touch.c', 'cat.c'],
|
2021-04-09 02:48:01 +00:00
|
|
|
'dep': [wlr_gles2_renderer],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'tablet': {
|
|
|
|
'src': 'tablet.c',
|
2021-04-09 02:48:01 +00:00
|
|
|
'dep': [wlr_gles2_renderer],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'rotation': {
|
|
|
|
'src': ['rotation.c', 'cat.c'],
|
2021-04-09 02:48:01 +00:00
|
|
|
'dep': [wlr_gles2_renderer],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'multi-pointer': {
|
|
|
|
'src': 'multi-pointer.c',
|
2021-04-09 02:48:01 +00:00
|
|
|
'dep': [wlr_gles2_renderer],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'output-layout': {
|
|
|
|
'src': ['output-layout.c', 'cat.c'],
|
2021-04-09 02:48:01 +00:00
|
|
|
'dep': [wlr_gles2_renderer],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
2019-11-22 07:11:15 +00:00
|
|
|
'fullscreen-shell': {
|
|
|
|
'src': 'fullscreen-shell.c',
|
2020-01-24 07:37:34 +00:00
|
|
|
'proto': ['fullscreen-shell-unstable-v1'],
|
2019-11-22 07:11:15 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
clients = {
|
2018-08-24 07:35:02 +00:00
|
|
|
'idle': {
|
|
|
|
'src': 'idle.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': threads,
|
|
|
|
'proto': ['kde-idle'],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'idle-inhibit': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['idle-inhibit.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'idle-inhibit-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
2020-02-14 18:26:40 +00:00
|
|
|
'keyboard-shortcuts-inhibit': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['keyboard-shortcuts-inhibit.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
2020-02-14 18:26:40 +00:00
|
|
|
'proto': [
|
|
|
|
'keyboard-shortcuts-inhibit-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
|
|
|
},
|
2018-08-24 07:35:02 +00:00
|
|
|
'layer-shell': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['layer-shell.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, wayland_cursor, wlroots, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'wlr-layer-shell-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'input-inhibitor': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['input-inhibitor.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'wlr-input-inhibitor-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'gamma-control': {
|
|
|
|
'src': 'gamma-control.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': [wayland_cursor, math],
|
|
|
|
'proto': ['wlr-gamma-control-unstable-v1'],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
2019-10-25 17:26:22 +00:00
|
|
|
'output-power-management': {
|
|
|
|
'src': 'output-power-management.c',
|
|
|
|
'dep': [wayland_client, wlroots],
|
|
|
|
'proto': ['wlr-output-power-management-unstable-v1'],
|
|
|
|
},
|
2018-08-10 16:19:16 +00:00
|
|
|
'pointer-constraints': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['pointer-constraints.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'pointer-constraints-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-10 16:19:16 +00:00
|
|
|
},
|
2018-10-03 05:16:24 +00:00
|
|
|
'relative-pointer': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['relative-pointer-unstable-v1.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'pointer-constraints-unstable-v1',
|
|
|
|
'relative-pointer-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-10-03 05:16:24 +00:00
|
|
|
},
|
2018-08-24 07:35:02 +00:00
|
|
|
'dmabuf-capture': {
|
|
|
|
'src': 'dmabuf-capture.c',
|
|
|
|
'dep': [
|
|
|
|
libavcodec,
|
|
|
|
libavformat,
|
|
|
|
libavutil,
|
2018-10-15 20:34:23 +00:00
|
|
|
drm.partial_dependency(compile_args: true), # <drm_fourcc.h>
|
2018-08-24 07:35:02 +00:00
|
|
|
threads,
|
|
|
|
],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': ['wlr-export-dmabuf-unstable-v1'],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'screencopy': {
|
|
|
|
'src': 'screencopy.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': [libpng, rt],
|
|
|
|
'proto': ['wlr-screencopy-unstable-v1'],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
2020-04-22 22:14:38 +00:00
|
|
|
'screencopy-dmabuf': {
|
|
|
|
'src': 'screencopy-dmabuf.c',
|
|
|
|
'dep': [libpng, rt, gbm, drm],
|
|
|
|
'proto': [
|
|
|
|
'wlr-screencopy-unstable-v1',
|
|
|
|
'linux-dmabuf-unstable-v1',
|
|
|
|
],
|
|
|
|
},
|
2018-08-24 07:35:02 +00:00
|
|
|
'toplevel-decoration': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['toplevel-decoration.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'xdg-decoration-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
2018-08-23 09:38:39 +00:00
|
|
|
'input-method': {
|
2018-11-06 07:09:26 +00:00
|
|
|
'src': 'input-method.c',
|
2020-11-26 12:23:34 +00:00
|
|
|
'dep': [wayland_egl, libepoll],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'input-method-unstable-v2',
|
|
|
|
'text-input-unstable-v3',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-11-06 07:09:26 +00:00
|
|
|
},
|
2018-03-29 17:41:33 +00:00
|
|
|
'text-input': {
|
2021-01-28 23:13:53 +00:00
|
|
|
'src': ['text-input.c', 'egl_common.c'],
|
2021-02-08 12:47:47 +00:00
|
|
|
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
2019-11-22 07:11:15 +00:00
|
|
|
'proto': [
|
|
|
|
'text-input-unstable-v3',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2019-01-06 11:08:45 +00:00
|
|
|
},
|
2018-11-29 10:31:17 +00:00
|
|
|
'foreign-toplevel': {
|
|
|
|
'src': 'foreign-toplevel.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': [wlroots],
|
|
|
|
'proto': ['wlr-foreign-toplevel-management-unstable-v1'],
|
2019-01-06 11:08:45 +00:00
|
|
|
},
|
2019-10-20 14:03:24 +00:00
|
|
|
'virtual-pointer': {
|
|
|
|
'src': 'virtual-pointer.c',
|
|
|
|
'dep': wlroots,
|
|
|
|
'proto': ['wlr-virtual-pointer-unstable-v1'],
|
|
|
|
},
|
2020-07-08 08:48:29 +00:00
|
|
|
'input-method-keyboard-grab': {
|
|
|
|
'src': 'input-method-keyboard-grab.c',
|
|
|
|
'dep': xkbcommon,
|
|
|
|
'proto': [
|
|
|
|
'input-method-unstable-v2',
|
|
|
|
],
|
|
|
|
},
|
2018-08-24 07:35:02 +00:00
|
|
|
}
|
2018-05-27 03:03:29 +00:00
|
|
|
|
2019-11-22 07:11:15 +00:00
|
|
|
foreach name, info : compositors
|
2020-01-24 07:37:34 +00:00
|
|
|
extra_src = []
|
|
|
|
foreach p : info.get('proto', [])
|
2020-04-21 13:19:24 +00:00
|
|
|
extra_src += protocols_server_header[p]
|
2020-01-24 07:37:34 +00:00
|
|
|
endforeach
|
|
|
|
|
2019-10-08 16:30:49 +00:00
|
|
|
executable(
|
|
|
|
name,
|
2020-01-24 07:37:34 +00:00
|
|
|
[info.get('src'), extra_src],
|
2021-04-09 02:48:01 +00:00
|
|
|
dependencies: [wlroots, libdrm, info.get('dep', [])],
|
2019-11-22 07:11:15 +00:00
|
|
|
include_directories: [wlr_inc, proto_inc],
|
|
|
|
build_by_default: get_option('examples'),
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach name, info : clients
|
|
|
|
extra_src = []
|
|
|
|
foreach p : info.get('proto')
|
2020-04-21 13:19:24 +00:00
|
|
|
extra_src += protocols_code[p]
|
|
|
|
extra_src += protocols_client_header[p]
|
2019-11-22 07:11:15 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
executable(
|
|
|
|
name,
|
|
|
|
[info.get('src'), extra_src],
|
|
|
|
dependencies: [wayland_client, info.get('dep')],
|
2019-10-08 16:30:49 +00:00
|
|
|
build_by_default: get_option('examples'),
|
|
|
|
)
|
2018-08-24 07:35:02 +00:00
|
|
|
endforeach
|