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')
|
2021-12-07 15:11:29 +00:00
|
|
|
wayland_client = dependency('wayland-client')
|
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)
|
2022-05-29 12:09:06 +00:00
|
|
|
gbm = dependency('gbm', 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
|
|
|
|
|
2021-06-22 19:05:53 +00:00
|
|
|
if 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
|
|
|
|
|
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'],
|
|
|
|
},
|
|
|
|
'tablet': {
|
|
|
|
'src': 'tablet.c',
|
|
|
|
},
|
|
|
|
'rotation': {
|
|
|
|
'src': ['rotation.c', 'cat.c'],
|
|
|
|
},
|
|
|
|
'multi-pointer': {
|
|
|
|
'src': 'multi-pointer.c',
|
|
|
|
},
|
|
|
|
'output-layout': {
|
|
|
|
'src': ['output-layout.c', 'cat.c'],
|
|
|
|
},
|
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
|
|
|
},
|
2021-04-17 00:39:46 +00:00
|
|
|
'quads': {
|
|
|
|
'src': 'quads.c',
|
|
|
|
},
|
2020-05-06 15:30:53 +00:00
|
|
|
'scene-graph': {
|
|
|
|
'src': 'scene-graph.c',
|
|
|
|
'proto': ['xdg-shell'],
|
|
|
|
},
|
2022-08-18 13:55:47 +00:00
|
|
|
'output-layers': {
|
|
|
|
'src': 'output-layers.c',
|
|
|
|
'proto': [
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
|
|
|
},
|
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-12-07 15:19:26 +00:00
|
|
|
'dep': [wayland_egl, wayland_cursor, 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',
|
2021-12-07 15:20:20 +00:00
|
|
|
'dep': [wayland_client],
|
2019-10-25 17:26:22 +00:00
|
|
|
'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,
|
2021-12-07 15:20:54 +00:00
|
|
|
drm,
|
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
|
|
|
'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',
|
|
|
|
'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-19 15:32:07 +00:00
|
|
|
dependencies: [wlroots, libdrm],
|
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],
|
2021-12-07 15:20:20 +00:00
|
|
|
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
|