Codebase list wlroots / 368f74e
Refactor meson build files Use tabs for indentation and break up function calls over 80 col. Tony Crisci 6 years ago
9 changed file(s) with 209 addition(s) and 151 deletion(s). Raw diff Collapse all Expand all
00 backend_files = files(
1 'backend.c',
2 'session/direct-ipc.c',
3 'session/direct.c',
4 'session/session.c',
5 'drm/backend.c',
6 'drm/drm.c',
7 'drm/drm-atomic.c',
8 'drm/drm-legacy.c',
9 'drm/drm-properties.c',
10 'drm/drm-util.c',
11 'libinput/backend.c',
12 'libinput/events.c',
13 'libinput/keyboard.c',
14 'libinput/pointer.c',
15 'libinput/tablet_pad.c',
16 'libinput/tablet_tool.c',
17 'libinput/touch.c',
18 'multi/backend.c',
19 'wayland/backend.c',
20 'wayland/output.c',
21 'wayland/registry.c',
22 'wayland/wl_seat.c',
23 'wayland/os-compatibility.c',
1 'backend.c',
2 'session/direct-ipc.c',
3 'session/direct.c',
4 'session/session.c',
5 'drm/backend.c',
6 'drm/drm.c',
7 'drm/drm-atomic.c',
8 'drm/drm-legacy.c',
9 'drm/drm-properties.c',
10 'drm/drm-util.c',
11 'libinput/backend.c',
12 'libinput/events.c',
13 'libinput/keyboard.c',
14 'libinput/pointer.c',
15 'libinput/tablet_pad.c',
16 'libinput/tablet_tool.c',
17 'libinput/touch.c',
18 'multi/backend.c',
19 'wayland/backend.c',
20 'wayland/output.c',
21 'wayland/registry.c',
22 'wayland/wl_seat.c',
23 'wayland/os-compatibility.c',
2424 )
2525
2626 if systemd.found()
27 backend_files += files('session/logind.c')
27 backend_files += files('session/logind.c')
2828 endif
2929
30 lib_wlr_backend = static_library('wlr_backend', backend_files,
31 include_directories: wlr_inc,
32 dependencies: [wayland_server, egl, gbm, libinput, systemd, wlr_protos])
30 lib_wlr_backend = static_library(
31 'wlr_backend',
32 backend_files,
33 include_directories: wlr_inc,
34 dependencies: [wayland_server, egl, gbm, libinput, systemd, wlr_protos],
35 )
0 lib_shared = static_library('shared',
1 ['shared.c', 'cat.c', 'ini.c', 'config.c'],
2 dependencies: wlroots)
0 lib_shared = static_library(
1 'shared',
2 ['shared.c', 'cat.c', 'ini.c', 'config.c'],
3 dependencies: wlroots,
4 )
35
46 executable('simple', 'simple.c', dependencies: wlroots, link_with: lib_shared)
5 executable('rotation', 'rotation.c', dependencies: wlroots, link_with: lib_shared)
67 executable('pointer', 'pointer.c', dependencies: wlroots, link_with: lib_shared)
78 executable('touch', 'touch.c', dependencies: wlroots, link_with: lib_shared)
89 executable('tablet', 'tablet.c', dependencies: wlroots, link_with: lib_shared)
9 executable('output-layout', 'output-layout.c', dependencies: wlroots, link_with: lib_shared)
1010
11 executable('compositor', 'compositor.c',
12 dependencies: wlroots,
13 link_with: lib_shared)
11 executable(
12 'rotation',
13 'rotation.c',
14 dependencies: wlroots,
15 link_with: lib_shared,
16 )
17
18 executable(
19 'output-layout',
20 'output-layout.c',
21 dependencies: wlroots,
22 link_with: lib_shared,
23 )
24
25 executable(
26 'compositor',
27 'compositor.c',
28 dependencies: wlroots,
29 link_with: lib_shared,
30 )
0 project('wlroots', 'c',
1 license: 'MIT',
2 default_options: [
3 'c_std=c11',
4 'warning_level=2',
5 'werror=true',
6 ])
0 project(
1 'wlroots',
2 'c',
3 license: 'MIT',
4 default_options: [
5 'c_std=c11',
6 'warning_level=2',
7 'werror=true',
8 ],
9 )
710
811 add_project_arguments('-Wno-unused-parameter', language: 'c')
9 add_project_arguments('-DWLR_SRC_DIR="@0@"'.format(meson.source_root()), language: 'c')
10 add_project_link_arguments('-Wl,-rpath,@0@'.format(meson.build_root()), language: 'c')
12 add_project_arguments(
13 '-DWLR_SRC_DIR="@0@"'.format(meson.source_root()),
14 language: 'c',
15 )
16 add_project_link_arguments(
17 '-Wl,-rpath,@0@'.format(meson.build_root()),
18 language: 'c',
19 )
1120
1221 wlr_inc = include_directories('include')
1322
1423 cc = meson.get_compiler('c')
1524
16 # Clang complains about some zeroed initialiser lists (= {0}), even though they are valid
25 # Clang complains about some zeroed initialiser lists (= {0}), even though they
26 # are valid
1727 if cc.get_id() == 'clang'
18 add_project_arguments('-Wno-missing-field-initializers', language: 'c')
19 add_project_arguments('-Wno-missing-braces', language: 'c')
28 add_project_arguments('-Wno-missing-field-initializers', language: 'c')
29 add_project_arguments('-Wno-missing-braces', language: 'c')
2030 endif
2131
2232 wayland_server = dependency('wayland-server')
3848 math = cc.find_library('m', required: false)
3949
4050 if libcap.found() and get_option('enable_libcap')
41 add_project_arguments('-DHAS_LIBCAP', language: 'c')
51 add_project_arguments('-DHAS_LIBCAP', language: 'c')
4252 endif
4353
4454 if systemd.found() and get_option('enable_systemd')
45 add_project_arguments('-DHAS_SYSTEMD', language: 'c')
55 add_project_arguments('-DHAS_SYSTEMD', language: 'c')
4656 endif
4757
4858 subdir('protocol')
5464 subdir('xwayland')
5565
5666 wlr_deps = [
57 wayland_server,
58 wayland_client,
59 wayland_egl,
60 wayland_protos,
61 egl,
62 glesv2,
63 drm,
64 gbm,
65 libinput,
66 xkbcommon,
67 udev,
68 pixman,
69 xcb,
70 xcb_composite,
71 libcap,
72 systemd,
73 math,
67 wayland_server,
68 wayland_client,
69 wayland_egl,
70 wayland_protos,
71 egl,
72 glesv2,
73 drm,
74 gbm,
75 libinput,
76 xkbcommon,
77 udev,
78 pixman,
79 xcb,
80 xcb_composite,
81 libcap,
82 systemd,
83 math,
7484 ]
7585
76 lib_wlr = library('wlroots', files('dummy.c'),
77 link_whole: [
78 lib_wl_protos,
79 lib_wlr_backend,
80 lib_wlr_render,
81 lib_wlr_types,
82 lib_wlr_util,
83 lib_wlr_xcursor,
84 lib_wlr_xwayland,
85 ],
86 dependencies: wlr_deps,
87 include_directories: wlr_inc)
86 lib_wlr = library(
87 'wlroots',
88 files('dummy.c'),
89 link_whole: [
90 lib_wl_protos,
91 lib_wlr_backend,
92 lib_wlr_render,
93 lib_wlr_types,
94 lib_wlr_util,
95 lib_wlr_xcursor,
96 lib_wlr_xwayland,
97 ],
98 dependencies: wlr_deps,
99 include_directories: wlr_inc,
100 )
88101
89 wlroots = declare_dependency(link_with: lib_wlr,
90 dependencies: wlr_deps,
91 include_directories: wlr_inc)
102 wlroots = declare_dependency(
103 link_with: lib_wlr,
104 dependencies: wlr_deps,
105 include_directories: wlr_inc,
106 )
92107
93108 subdir('examples')
11
22 wayland_scanner = find_program('wayland-scanner')
33
4 wayland_scanner_server = generator(wayland_scanner,
5 output: '@BASENAME@-protocol.h',
6 arguments: ['server-header', '@INPUT@', '@OUTPUT@'])
4 wayland_scanner_server = generator(
5 wayland_scanner,
6 output: '@BASENAME@-protocol.h',
7 arguments: ['server-header', '@INPUT@', '@OUTPUT@'],
8 )
79
8 wayland_scanner_code = generator(wayland_scanner,
9 output: '@BASENAME@-protocol.c',
10 arguments: ['code', '@INPUT@', '@OUTPUT@'])
10 wayland_scanner_code = generator(
11 wayland_scanner,
12 output: '@BASENAME@-protocol.c',
13 arguments: ['code', '@INPUT@', '@OUTPUT@'],
14 )
1115
12 wayland_scanner_client = generator(wayland_scanner,
13 output: '@BASENAME@-client-protocol.h',
14 arguments: ['client-header', '@INPUT@', '@OUTPUT@'])
16 wayland_scanner_client = generator(
17 wayland_scanner,
18 output: '@BASENAME@-client-protocol.h',
19 arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
20 )
1521
1622 protocols = [
17 [ wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml' ]
23 [wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml'],
1824 ]
1925
2026 client_protocols = [
21 [ wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml' ]
27 [wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml']
2228 ]
2329
2430 wl_protos_src = []
2531 wl_protos_headers = []
2632
2733 foreach p : protocols
28 xml = join_paths(p)
29 wl_protos_src += wayland_scanner_code.process(xml)
30 wl_protos_headers += wayland_scanner_server.process(xml)
34 xml = join_paths(p)
35 wl_protos_src += wayland_scanner_code.process(xml)
36 wl_protos_headers += wayland_scanner_server.process(xml)
3137 endforeach
3238
3339 foreach p : client_protocols
34 xml = join_paths(p)
35 wl_protos_headers += wayland_scanner_client.process(xml)
40 xml = join_paths(p)
41 wl_protos_headers += wayland_scanner_client.process(xml)
3642 endforeach
3743
3844 lib_wl_protos = static_library('wl_protos', wl_protos_src + wl_protos_headers)
45
3946 wlr_protos = declare_dependency(
40 link_with: lib_wl_protos,
41 sources: wl_protos_headers)
47 link_with: lib_wl_protos,
48 sources: wl_protos_headers,
49 )
0 lib_wlr_render = static_library('wlr_render', files(
1 'egl.c',
2 'matrix.c',
3 'gles2/pixel_format.c',
4 'gles2/renderer.c',
5 'gles2/shaders.c',
6 'gles2/texture.c',
7 'gles2/util.c',
8 'wlr_renderer.c',
9 'wlr_texture.c',
10 ),
11 include_directories: wlr_inc,
12 dependencies: [glesv2, egl])
0 lib_wlr_render = static_library(
1 'wlr_render',
2 files(
3 'egl.c',
4 'matrix.c',
5 'gles2/pixel_format.c',
6 'gles2/renderer.c',
7 'gles2/shaders.c',
8 'gles2/texture.c',
9 'gles2/util.c',
10 'wlr_renderer.c',
11 'wlr_texture.c',
12 ),
13 include_directories: wlr_inc,
14 dependencies: [glesv2, egl],
15 )
0 lib_wlr_types = static_library('wlr_types', files(
1 'wlr_data_device_manager.c',
2 'wlr_data_source.c',
3 'wlr_input_device.c',
4 'wlr_keyboard.c',
5 'wlr_output.c',
6 'wlr_output_layout.c',
7 'wlr_pointer.c',
8 'wlr_cursor.c',
9 'wlr_region.c',
10 'wlr_seat.c',
11 'wlr_surface.c',
12 'wlr_tablet_pad.c',
13 'wlr_tablet_tool.c',
14 'wlr_touch.c',
15 'wlr_xdg_shell_v6.c',
16 'wlr_wl_shell.c',
17 'wlr_compositor.c',
18 'wlr_box.c',
19 ),
20 include_directories: wlr_inc,
21 dependencies: [wayland_server, pixman, wlr_protos])
0 lib_wlr_types = static_library(
1 'wlr_types',
2 files(
3 'wlr_data_device_manager.c',
4 'wlr_data_source.c',
5 'wlr_input_device.c',
6 'wlr_keyboard.c',
7 'wlr_output.c',
8 'wlr_output_layout.c',
9 'wlr_pointer.c',
10 'wlr_cursor.c',
11 'wlr_region.c',
12 'wlr_seat.c',
13 'wlr_surface.c',
14 'wlr_tablet_pad.c',
15 'wlr_tablet_tool.c',
16 'wlr_touch.c',
17 'wlr_xdg_shell_v6.c',
18 'wlr_wl_shell.c',
19 'wlr_compositor.c',
20 'wlr_box.c',
21 ),
22 include_directories: wlr_inc,
23 dependencies: [wayland_server, pixman, wlr_protos],
24 )
0 lib_wlr_util = static_library('wlr_util', files(
1 'list.c',
2 'log.c',
3 ),
4 include_directories: wlr_inc)
0 lib_wlr_util = static_library(
1 'wlr_util',
2 files(
3 'list.c',
4 'log.c',
5 ),
6 include_directories: wlr_inc,
7 )
0 lib_wlr_xcursor = static_library('wlr_xcursor', files(
1 'xcursor.c',
2 'wlr_xcursor.c',
3 ),
4 include_directories: wlr_inc)
0 lib_wlr_xcursor = static_library(
1 'wlr_xcursor',
2 files(
3 'xcursor.c',
4 'wlr_xcursor.c',
5 ),
6 include_directories: wlr_inc,
7 )
0 lib_wlr_xwayland = static_library('wlr_xwayland', files(
1 'sockets.c',
2 'xwayland.c',
3 'xwm.c',
4 ),
5 include_directories: wlr_inc,
6 dependencies: [wayland_server, xcb, xcb_composite, pixman])
0 lib_wlr_xwayland = static_library(
1 'wlr_xwayland',
2 files(
3 'sockets.c',
4 'xwayland.c',
5 'xwm.c',
6 ),
7 include_directories: wlr_inc,
8 dependencies: [wayland_server, xcb, xcb_composite, pixman],
9 )