2018-01-07 20:42:33 +01:00
|
|
|
threads = dependency('threads')
|
2018-03-30 23:26:58 +02:00
|
|
|
wayland_cursor = dependency('wayland-cursor')
|
2019-10-08 18:30:49 +02:00
|
|
|
libpng = dependency('libpng', 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)
|
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
|
|
|
|
|
2019-10-08 18:33:19 +02: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 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'],
|
|
|
|
},
|
|
|
|
'multi-pointer': {
|
|
|
|
'src': 'multi-pointer.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
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
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': {
|
|
|
|
'src': 'idle-inhibit.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': wlroots,
|
|
|
|
'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': {
|
|
|
|
'src': 'keyboard-shortcuts-inhibit.c',
|
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'proto': [
|
|
|
|
'keyboard-shortcuts-inhibit-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
|
|
|
},
|
2018-08-24 09:35:02 +02:00
|
|
|
'layer-shell': {
|
|
|
|
'src': 'layer-shell.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'proto': [
|
|
|
|
'wlr-layer-shell-unstable-v1',
|
|
|
|
'xdg-shell',
|
|
|
|
],
|
2018-08-24 09:35:02 +02:00
|
|
|
},
|
|
|
|
'input-inhibitor': {
|
|
|
|
'src': 'input-inhibitor.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'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',
|
|
|
|
'dep': [wayland_client, wlroots],
|
|
|
|
'proto': ['wlr-output-power-management-unstable-v1'],
|
|
|
|
},
|
2018-08-10 18:19:16 +02:00
|
|
|
'pointer-constraints': {
|
|
|
|
'src': 'pointer-constraints.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': wlroots,
|
|
|
|
'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': {
|
|
|
|
'src': 'relative-pointer-unstable-v1.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': wlroots,
|
|
|
|
'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,
|
2018-10-15 22:34:23 +02:00
|
|
|
drm.partial_dependency(compile_args: true), # <drm_fourcc.h>
|
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
|
|
|
},
|
|
|
|
'toplevel-decoration': {
|
|
|
|
'src': 'toplevel-decoration.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': wlroots,
|
|
|
|
'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',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': libepoll,
|
|
|
|
'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': {
|
2018-11-06 08:09:26 +01:00
|
|
|
'src': 'text-input.c',
|
2019-11-22 08:11:15 +01:00
|
|
|
'dep': [wayland_cursor, wlroots],
|
|
|
|
'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
|
|
|
'dep': [wlroots],
|
|
|
|
'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',
|
|
|
|
'dep': wlroots,
|
|
|
|
'proto': ['wlr-virtual-pointer-unstable-v1'],
|
|
|
|
},
|
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],
|
2019-11-22 08:11:15 +01: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 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],
|
|
|
|
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
|