From 924bf0f669cde20b414cd9f12e72750ca5fdbbaf Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 11 Jul 2017 00:20:31 +1200 Subject: Changed build system to meson --- backend/CMakeLists.txt | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 backend/CMakeLists.txt (limited to 'backend') diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt deleted file mode 100644 index 5486b302..00000000 --- a/backend/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -include_directories( - ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_INCLUDE_DIR} - ${DRM_INCLUDE_DIRS} - ${LIBINPUT_INCLUDE_DIRS} -) - -add_library(wlr-backend - wayland/backend.c - wayland/registry.c - wayland/wl_seat.c - wayland/output.c - drm/backend.c - drm/drm.c - - libinput/backend.c - libinput/events.c - libinput/keyboard.c - libinput/pointer.c - libinput/touch.c - libinput/tablet_tool.c - libinput/tablet_pad.c - - multi/backend.c - backend.c - egl.c - udev.c -) - -target_link_libraries(wlr-backend - wlr-util - wlr-types - ${WAYLAND_LIBRARIES} - ${DRM_LIBRARIES} - ${GBM_LIBRARIES} - ${GLESv2_LIBRARIES} - ${EGL_LIBRARIES} - ${SYSTEMD_LIBRARIES} - ${UDEV_LIBRARIES} - ${LIBINPUT_LIBRARIES} - ${GBM_LIBRARIES} -) -- cgit v1.2.3 From a2ba226ba3f06236518cd15cab807a42c309b6dd Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 11 Jul 2017 09:56:54 +1200 Subject: Use subdir --- backend/meson.build | 19 ++++++++++++++ examples/meson.build | 22 ++++++++++++++++ meson.build | 74 +++++++--------------------------------------------- render/meson.build | 10 +++++++ session/meson.build | 9 +++++++ types/meson.build | 9 +++++++ util/meson.build | 4 +++ 7 files changed, 82 insertions(+), 65 deletions(-) create mode 100644 backend/meson.build create mode 100644 examples/meson.build create mode 100644 render/meson.build create mode 100644 session/meson.build create mode 100644 types/meson.build create mode 100644 util/meson.build (limited to 'backend') diff --git a/backend/meson.build b/backend/meson.build new file mode 100644 index 00000000..02b79e65 --- /dev/null +++ b/backend/meson.build @@ -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', +) diff --git a/examples/meson.build b/examples/meson.build new file mode 100644 index 00000000..4cc05073 --- /dev/null +++ b/examples/meson.build @@ -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) diff --git a/meson.build b/meson.build index 561128f1..547e5372 100644 --- a/meson.build +++ b/meson.build @@ -49,79 +49,23 @@ all_deps = [ 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() add_project_arguments('-DHAS_LIBCAP', language: 'c') endif if dep_systemd.found() - wlr_src = wlr_src + ['session/logind.c'] add_project_arguments('-DHAS_SYSTEMD', language: 'c') endif -lib_wlr = library('wlroots', wlr_src, - dependencies: all_deps) -dep_wlr = declare_dependency(link_with: lib_wlr, - dependencies: all_deps) - -lib_shared = static_library('shared', - ['examples/shared.c', 'examples/cat.c'], - dependencies: dep_wlr) +wlr_files = [] -all_libs = [ - lib_shared, - lib_wlr, -] - -executable('simple', 'examples/simple.c', link_with: all_libs) -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) +subdir('backend') +subdir('render') +subdir('session') +subdir('types') +subdir('util') -compositor_src = [ - 'examples/compositor/main.c', - 'examples/compositor/wl_compositor.c', - 'examples/compositor/wl_shell.c', -] +lib_wlr = library('wlroots', wlr_files, dependencies: all_deps) +dep_wlr = declare_dependency(link_with: lib_wlr, dependencies: all_deps) -executable('compositor', compositor_src, link_with: all_libs) +subdir('examples') diff --git a/render/meson.build b/render/meson.build new file mode 100644 index 00000000..2fdba62c --- /dev/null +++ b/render/meson.build @@ -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', +) diff --git a/session/meson.build b/session/meson.build new file mode 100644 index 00000000..4521cff6 --- /dev/null +++ b/session/meson.build @@ -0,0 +1,9 @@ +wlr_files += files( + 'direct-ipc.c', + 'direct.c', + 'session.c', +) + +if dep_systemd.found() + wlr_files += files('logind.c') +endif diff --git a/types/meson.build b/types/meson.build new file mode 100644 index 00000000..323806c6 --- /dev/null +++ b/types/meson.build @@ -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', +) diff --git a/util/meson.build b/util/meson.build new file mode 100644 index 00000000..7b80c23f --- /dev/null +++ b/util/meson.build @@ -0,0 +1,4 @@ +wlr_files += files( + 'list.c', + 'log.c', +) -- cgit v1.2.3