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