2018-01-07 19:42:33 +00:00
|
|
|
threads = dependency('threads')
|
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)
|
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)
|
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
|
|
|
|
|
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
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
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': {
|
|
|
|
'src': 'idle-inhibit.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': wlroots,
|
|
|
|
'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': {
|
|
|
|
'src': 'keyboard-shortcuts-inhibit.c',
|
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'proto': [
|
|
|
|
'keyboard-shortcuts-inhibit-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
|
|
|
},
|
2018-08-24 07:35:02 +00:00
|
|
|
'layer-shell': {
|
|
|
|
'src': 'layer-shell.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'proto': [
|
|
|
|
'wlr-layer-shell-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-24 07:35:02 +00:00
|
|
|
},
|
|
|
|
'input-inhibitor': {
|
|
|
|
'src': 'input-inhibitor.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'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': {
|
|
|
|
'src': 'pointer-constraints.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': wlroots,
|
|
|
|
'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': {
|
|
|
|
'src': 'relative-pointer-unstable-v1.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': wlroots,
|
|
|
|
'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': {
|
|
|
|
'src': 'toplevel-decoration.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': wlroots,
|
|
|
|
'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',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': libepoll,
|
|
|
|
'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': {
|
2018-11-06 07:09:26 +00:00
|
|
|
'src': 'text-input.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'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'],
|
|
|
|
},
|
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],
|
2019-11-22 07:11:15 +00:00
|
|
|
dependencies: wlroots,
|
|
|
|
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
|