Use subdir

This commit is contained in:
Scott Anderson 2017-07-11 09:56:54 +12:00
parent 924bf0f669
commit a2ba226ba3
7 changed files with 82 additions and 65 deletions

19
backend/meson.build Normal file
View File

@ -0,0 +1,19 @@
wlr_files += files(
'backend.c',
'egl.c',
'udev.c',
'drm/backend.c',
'drm/drm.c',
'libinput/backend.c',
'libinput/events.c',
'libinput/keyboard.c',
'libinput/pointer.c',
'libinput/tablet_pad.c',
'libinput/tablet_tool.c',
'libinput/touch.c',
'multi/backend.c',
'wayland/backend.c',
'wayland/output.c',
'wayland/registry.c',
'wayland/wl_seat.c',
)

22
examples/meson.build Normal file
View File

@ -0,0 +1,22 @@
lib_shared = static_library('shared',
['shared.c', 'cat.c'],
dependencies: dep_wlr)
all_libs = [
lib_shared,
lib_wlr,
]
executable('simple', 'simple.c', link_with: all_libs)
executable('rotation', 'rotation.c', link_with: all_libs)
executable('pointer', 'pointer.c', link_with: all_libs)
executable('touch', 'touch.c', link_with: all_libs)
executable('tablet', 'tablet.c', link_with: all_libs)
compositor_src = [
'compositor/main.c',
'compositor/wl_compositor.c',
'compositor/wl_shell.c',
]
executable('compositor', compositor_src, link_with: all_libs)

View File

@ -49,79 +49,23 @@ all_deps = [
dep_math, dep_math,
] ]
wlr_src = [
'backend/wayland/backend.c',
'backend/wayland/registry.c',
'backend/wayland/wl_seat.c',
'backend/wayland/output.c',
'backend/drm/backend.c',
'backend/drm/drm.c',
'backend/backend.c',
'backend/libinput/backend.c',
'backend/libinput/events.c',
'backend/libinput/keyboard.c',
'backend/libinput/pointer.c',
'backend/libinput/tablet_pad.c',
'backend/libinput/tablet_tool.c',
'backend/libinput/touch.c',
'backend/multi/backend.c',
'backend/udev.c',
'backend/egl.c',
'session/direct-ipc.c',
'session/direct.c',
'session/session.c',
'types/wlr_input_device.c',
'types/wlr_keyboard.c',
'types/wlr_pointer.c',
'types/wlr_tablet_pad.c',
'types/wlr_tablet_tool.c',
'types/wlr_touch.c',
'types/wlr_output.c',
'render/matrix.c',
'render/gles2/pixel_format.c',
'render/gles2/renderer.c',
'render/gles2/shaders.c',
'render/gles2/surface.c',
'render/gles2/util.c',
'render/wlr_renderer.c',
'render/wlr_surface.c',
'util/list.c',
'util/log.c',
]
if dep_libcap.found() if dep_libcap.found()
add_project_arguments('-DHAS_LIBCAP', language: 'c') add_project_arguments('-DHAS_LIBCAP', language: 'c')
endif endif
if dep_systemd.found() if dep_systemd.found()
wlr_src = wlr_src + ['session/logind.c']
add_project_arguments('-DHAS_SYSTEMD', language: 'c') add_project_arguments('-DHAS_SYSTEMD', language: 'c')
endif endif
lib_wlr = library('wlroots', wlr_src, wlr_files = []
dependencies: all_deps)
dep_wlr = declare_dependency(link_with: lib_wlr,
dependencies: all_deps)
lib_shared = static_library('shared', subdir('backend')
['examples/shared.c', 'examples/cat.c'], subdir('render')
dependencies: dep_wlr) subdir('session')
subdir('types')
subdir('util')
all_libs = [ lib_wlr = library('wlroots', wlr_files, dependencies: all_deps)
lib_shared, dep_wlr = declare_dependency(link_with: lib_wlr, dependencies: all_deps)
lib_wlr,
]
executable('simple', 'examples/simple.c', link_with: all_libs) subdir('examples')
executable('rotation', 'examples/rotation.c', link_with: all_libs)
executable('pointer', 'examples/pointer.c', link_with: all_libs)
executable('touch', 'examples/touch.c', link_with: all_libs)
executable('tablet', 'examples/tablet.c', link_with: all_libs)
compositor_src = [
'examples/compositor/main.c',
'examples/compositor/wl_compositor.c',
'examples/compositor/wl_shell.c',
]
executable('compositor', compositor_src, link_with: all_libs)

10
render/meson.build Normal file
View File

@ -0,0 +1,10 @@
wlr_files += files(
'matrix.c',
'wlr_renderer.c',
'wlr_surface.c',
'gles2/pixel_format.c',
'gles2/renderer.c',
'gles2/shaders.c',
'gles2/surface.c',
'gles2/util.c',
)

9
session/meson.build Normal file
View File

@ -0,0 +1,9 @@
wlr_files += files(
'direct-ipc.c',
'direct.c',
'session.c',
)
if dep_systemd.found()
wlr_files += files('logind.c')
endif

9
types/meson.build Normal file
View File

@ -0,0 +1,9 @@
wlr_files += files(
'wlr_input_device.c',
'wlr_keyboard.c',
'wlr_output.c',
'wlr_pointer.c',
'wlr_tablet_pad.c',
'wlr_tablet_tool.c',
'wlr_touch.c',
)

4
util/meson.build Normal file
View File

@ -0,0 +1,4 @@
wlr_files += files(
'list.c',
'log.c',
)