From 0e87b3938a37b11c66ca4768f42bac21d5540eda Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 17 Aug 2019 18:12:20 -0700 Subject: [PATCH] deps: meson dependencies for gtk-layer-shell feature --- meson.build | 10 +++++++++- meson_options.txt | 1 + subprojects/gtk-layer-shell.wrap | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 subprojects/gtk-layer-shell.wrap diff --git a/meson.build b/meson.build index f7ae5d8..a3260d3 100644 --- a/meson.build +++ b/meson.build @@ -62,6 +62,9 @@ libnlgen = dependency('libnl-genl-3.0', required: get_option('libnl')) libpulse = dependency('libpulse', required: get_option('pulseaudio')) libudev = dependency('libudev', required: get_option('libudev')) libmpdclient = dependency('libmpdclient', required: get_option('mpd')) +gtk_layer_shell = dependency('gtk-layer-shell-0', + required: get_option('gtk-layer-shell'), + fallback : ['gtk-layer-shell', 'gtk_layer_shell_dep']) systemd = dependency('systemd', required: get_option('systemd')) prefix = get_option('prefix') @@ -136,6 +139,10 @@ if libmpdclient.found() src_files += 'src/modules/mpd.cpp' endif +if gtk_layer_shell.found() + add_project_arguments('-DHAVE_GTK_LAYER_SHELL', language: 'cpp') +endif + subdir('protocol') executable( @@ -158,7 +165,8 @@ executable( libnlgen, libpulse, libudev, - libmpdclient + libmpdclient, + gtk_layer_shell ], include_directories: [include_directories('include')], install: true, diff --git a/meson_options.txt b/meson_options.txt index 1b86b57..f70e0ff 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,3 +7,4 @@ option('dbusmenu-gtk', type: 'feature', value: 'auto', description: 'Enable supp option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') option('mpd', type: 'feature', value: 'auto', description: 'Enable support for the Music Player Daemon') option('out', type: 'string', value : '/', description: 'output prefix directory') +option('gtk-layer-shell', type: 'feature', value: 'disabled', description: 'Use gtk-layer-shell library for popups support') diff --git a/subprojects/gtk-layer-shell.wrap b/subprojects/gtk-layer-shell.wrap new file mode 100644 index 0000000..b826ab9 --- /dev/null +++ b/subprojects/gtk-layer-shell.wrap @@ -0,0 +1,5 @@ +[wrap-file] +directory = gtk-layer-shell-0.1.0 +source_filename = gtk-layer-shell-0.1.0.tar.gz +source_hash = f7569e27ae30b1a94c3ad6c955cf56240d6bc272b760d9d266ce2ccdb94a5cf0 +source_url = https://github.com/wmww/gtk-layer-shell/archive/v0.1.0/gtk-layer-shell-0.1.0.tar.gz