mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
examples: split clients in separate repository
The client examples are useful to try out protocols, however they don't need to live in the wlroots repository. Having both clients and compositors in the same place is confusing. The wlroots API changes often but protocols are set in stone.
This commit is contained in:
parent
b82a53a918
commit
0bb445eeff
19 changed files with 43 additions and 4719 deletions
|
|
@ -1,29 +1,10 @@
|
|||
threads = dependency('threads')
|
||||
wayland_egl = dependency('wayland-egl')
|
||||
wayland_cursor = dependency('wayland-cursor')
|
||||
wayland_client = dependency('wayland-client')
|
||||
libpng = dependency('libpng', required: false, disabler: true)
|
||||
egl = dependency('egl', required: false, disabler: true)
|
||||
glesv2 = dependency('glesv2', required: false, disabler: true)
|
||||
gbm = dependency('gbm', required: false, disabler: true)
|
||||
cairo = dependency('cairo', required: false, disabler: true)
|
||||
# These versions correspond to ffmpeg 4.0
|
||||
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)
|
||||
# Only needed for drm_fourcc.h
|
||||
libdrm_header = dependency('libdrm').partial_dependency(compile_args: true, includes: true)
|
||||
|
||||
# epoll is a separate library in FreeBSD
|
||||
if host_machine.system() == 'freebsd'
|
||||
libepoll = dependency('epoll-shim')
|
||||
else
|
||||
libepoll = dependency('', required: false)
|
||||
endif
|
||||
|
||||
if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
|
||||
libavutil = disabler()
|
||||
endif
|
||||
wayland_client = dependency('wayland-client', required: false, disabler: true)
|
||||
wayland_egl = dependency('wayland-egl', required: false, disabler: true)
|
||||
egl = dependency('egl', version: '>= 1.5', required: false, disabler: true)
|
||||
glesv2 = dependency('glesv2', required: false, disabler: true)
|
||||
|
||||
compositors = {
|
||||
'simple': {
|
||||
|
|
@ -62,131 +43,13 @@ compositors = {
|
|||
'src': 'cairo-buffer.c',
|
||||
'dep': cairo,
|
||||
},
|
||||
}
|
||||
|
||||
clients = {
|
||||
'idle-inhibit': {
|
||||
'src': ['idle-inhibit.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, egl, glesv2],
|
||||
'proto': [
|
||||
'idle-inhibit-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'keyboard-shortcuts-inhibit': {
|
||||
'src': ['keyboard-shortcuts-inhibit.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
||||
'proto': [
|
||||
'keyboard-shortcuts-inhibit-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'layer-shell': {
|
||||
'src': ['layer-shell.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
||||
'proto': [
|
||||
'wlr-layer-shell-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'input-inhibitor': {
|
||||
'src': ['input-inhibitor.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
||||
'proto': [
|
||||
'wlr-input-inhibitor-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'gamma-control': {
|
||||
'src': 'gamma-control.c',
|
||||
'dep': [wayland_cursor, math],
|
||||
'proto': ['wlr-gamma-control-unstable-v1'],
|
||||
},
|
||||
'output-power-management': {
|
||||
'src': 'output-power-management.c',
|
||||
'dep': [wayland_client],
|
||||
'proto': ['wlr-output-power-management-unstable-v1'],
|
||||
},
|
||||
'pointer-constraints': {
|
||||
'src': ['pointer-constraints.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, egl, glesv2],
|
||||
'proto': [
|
||||
'pointer-constraints-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'relative-pointer': {
|
||||
'src': ['relative-pointer-unstable-v1.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, egl, glesv2],
|
||||
'proto': [
|
||||
'pointer-constraints-unstable-v1',
|
||||
'relative-pointer-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'dmabuf-capture': {
|
||||
'src': 'dmabuf-capture.c',
|
||||
'dep': [
|
||||
libavcodec,
|
||||
libavformat,
|
||||
libavutil,
|
||||
drm,
|
||||
threads,
|
||||
],
|
||||
'proto': ['wlr-export-dmabuf-unstable-v1'],
|
||||
},
|
||||
'screencopy': {
|
||||
'src': 'screencopy.c',
|
||||
'dep': [libpng, rt],
|
||||
'proto': ['wlr-screencopy-unstable-v1'],
|
||||
},
|
||||
'screencopy-dmabuf': {
|
||||
'src': 'screencopy-dmabuf.c',
|
||||
'dep': [libpng, rt, gbm, drm],
|
||||
'proto': [
|
||||
'wlr-screencopy-unstable-v1',
|
||||
'linux-dmabuf-unstable-v1',
|
||||
],
|
||||
},
|
||||
'toplevel-decoration': {
|
||||
'src': ['toplevel-decoration.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, egl, glesv2],
|
||||
'proto': [
|
||||
'xdg-decoration-unstable-v1',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'input-method': {
|
||||
'src': 'input-method.c',
|
||||
'dep': [wayland_egl, libepoll],
|
||||
'proto': [
|
||||
'input-method-unstable-v2',
|
||||
'text-input-unstable-v3',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'text-input': {
|
||||
'src': ['text-input.c', 'egl_common.c'],
|
||||
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
|
||||
'proto': [
|
||||
'text-input-unstable-v3',
|
||||
'xdg-shell',
|
||||
],
|
||||
},
|
||||
'foreign-toplevel': {
|
||||
'src': 'foreign-toplevel.c',
|
||||
'proto': ['wlr-foreign-toplevel-management-unstable-v1'],
|
||||
},
|
||||
'virtual-pointer': {
|
||||
'src': 'virtual-pointer.c',
|
||||
'proto': ['wlr-virtual-pointer-unstable-v1'],
|
||||
},
|
||||
'input-method-keyboard-grab': {
|
||||
'src': 'input-method-keyboard-grab.c',
|
||||
'dep': xkbcommon,
|
||||
'proto': [
|
||||
'input-method-unstable-v2',
|
||||
'embedded': {
|
||||
'src': [
|
||||
'embedded.c',
|
||||
protocols_code['xdg-shell'],
|
||||
protocols_client_header['xdg-shell'],
|
||||
],
|
||||
'dep': [wayland_client, wayland_egl, egl, glesv2],
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -203,29 +66,3 @@ foreach name, info : compositors
|
|||
build_by_default: get_option('examples'),
|
||||
)
|
||||
endforeach
|
||||
|
||||
foreach name, info : clients
|
||||
extra_src = []
|
||||
foreach p : info.get('proto')
|
||||
extra_src += protocols_code[p]
|
||||
extra_src += protocols_client_header[p]
|
||||
endforeach
|
||||
|
||||
executable(
|
||||
name,
|
||||
[info.get('src'), extra_src],
|
||||
dependencies: [wayland_client, info.get('dep', [])],
|
||||
build_by_default: get_option('examples'),
|
||||
)
|
||||
endforeach
|
||||
|
||||
executable(
|
||||
'embedded',
|
||||
[
|
||||
'embedded.c',
|
||||
'egl_common.c',
|
||||
protocols_code['xdg-shell'],
|
||||
protocols_client_header['xdg-shell'],
|
||||
],
|
||||
dependencies: [wlroots, wayland_client, wayland_egl, egl, glesv2],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue