From 121b2f15757945f0a7c62668c64218b6df20c42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 6 May 2019 21:45:01 +0200 Subject: [PATCH] meson: enable_x11 -> backend_x11, enable_wayland -> backend_wayland --- bar/meson.build | 6 ++---- meson.build | 10 +++++----- modules/meson.build | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bar/meson.build b/bar/meson.build index c432817..2ef871d 100644 --- a/bar/meson.build +++ b/bar/meson.build @@ -1,14 +1,12 @@ bar_backends = [] -# TODO: X11 -if enable_x11 +if backend_x11 bar_x11 = declare_dependency(sources: ['xcb.c', 'xcb.h'], dependencies: [xcb_stuff, cairo, cairo_ft]) bar_backends += [bar_x11] endif -# TODO: conditional Wayland -if enable_wayland +if backend_wayland wayland_protocols = dependency('wayland-protocols') wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir') diff --git a/meson.build b/meson.build index db82e1b..3bbfe27 100644 --- a/meson.build +++ b/meson.build @@ -30,10 +30,10 @@ if xcb_aux.found() and xcb_cursor.found() and xcb_event.found() and \ xcb_ewmh.found() and xcb_randr.found() and xcb_render.found() and \ cairo_xcb.found() - enable_x11 = true + backend_x11 = true add_project_arguments('-DENABLE_X11', language: 'c') else - enable_x11 = false + backend_x11 = false endif wayland_client = dependency('wayland-client', required: get_option('backend-wayland')) @@ -41,13 +41,13 @@ wayland_cursor = dependency('wayland-cursor', required: get_option('backend-wayl wlroots = dependency('wlroots', required: get_option('backend-wayland')) if wayland_client.found() and wayland_cursor.found() and wlroots.found() - enable_wayland = true + backend_wayland = true add_project_arguments('-DENABLE_WAYLAND', language: 'c') else - enable_wayland = false + backend_wayland = false endif -if enable_x11 +if backend_x11 xcb_stuff_lib = static_library( 'xcb-stuff', 'xcb.c', 'xcb.h', dependencies: [xcb_aux, xcb_cursor, xcb_event, xcb_ewmh, xcb_randr, diff --git a/modules/meson.build b/modules/meson.build index 0d899c9..dd21bc7 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -21,7 +21,7 @@ deps = { 'removables': [[], [dynlist, udev]], } -if enable_x11 +if backend_x11 deps_x11_only = { 'xkb': [[], [xcb_stuff, xcb_xkb]], 'xwindow': [[], [xcb_stuff]], @@ -46,7 +46,7 @@ foreach mod, data : deps endif endforeach -if enable_x11 +if backend_x11 foreach mod, data : deps_x11_only sources = data[0] dep = data[1]