From 8d2e8d8a061287593e56cda5bde17a1ee2b9af5d Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Wed, 4 Mar 2020 02:38:04 +0000 Subject: [PATCH] xcursor: also look for cursor themes under ${datadir}/icons by default Same as https://gitlab.freedesktop.org/wayland/wayland/commit/dd8891be36ec --- meson_options.txt | 1 + xcursor/meson.build | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/meson_options.txt b/meson_options.txt index e6efd780..96a43469 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,3 +6,4 @@ option('xcb-icccm', type: 'feature', value: 'auto', description: 'Use xcb-icccm option('xwayland', type: 'feature', value: 'auto', yield: true, description: 'Enable support for X11 applications') option('x11-backend', type: 'feature', value: 'auto', description: 'Enable X11 backend') option('examples', type: 'boolean', value: true, description: 'Build example applications') +option('icon_directory', description: 'Location used to look for cursors (default: ${datadir}/icons)', type: 'string', value: '') diff --git a/xcursor/meson.build b/xcursor/meson.build index a85051e9..a167137a 100644 --- a/xcursor/meson.build +++ b/xcursor/meson.build @@ -1,3 +1,10 @@ +icondir = get_option('icon_directory') +if icondir == '' + icondir = join_paths(get_option('prefix'), get_option('datadir'), 'icons') +endif + +add_project_arguments('-DICONDIR="@0@"'.format(icondir), language : 'c') + wlr_files += files( 'wlr_xcursor.c', 'xcursor.c',