From 208bcd426991ad6a5e7fdd076c5ed37bba5c14d1 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 21 Oct 2021 22:51:38 +0200 Subject: [PATCH] build: add libnotify option to meson --- meson.build | 9 +++++++++ meson_options.txt | 1 + 2 files changed, 10 insertions(+) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index 59f4cca2..3500a3d2 100644 --- a/meson.build +++ b/meson.build @@ -45,10 +45,18 @@ libstrophe_dep = dependency('libstrophe', version: '>= 0.10.0') conf.set('HAVE_LIBSTROPHE', 1) +# optional dependencies +notify_dep = dependency('libnotify', required : get_option('notifications')) +if notify_dep.found() + conf.set_quoted('HAVE_LIBNOTIFY', '1') +endif + + conf.set_quoted('PACKAGE_VERSION', meson.project_version()) conf.set_quoted('PACKAGE_STATUS', 'development') # TODO: PROF_GIT_BRANCH, PROF_GIT_REVISION, PACKAGE_STATUS, + # change later: conf.set_quoted('GLOBAL_PYTHON_PLUGINS_PATH', '') conf.set_quoted('GLOBAL_C_PLUGINS_PATH', '') @@ -67,6 +75,7 @@ profanity = executable('profanity', thread_dep, m_dep, curses_dep, + notify_dep, libstrophe_dep ], include_directories : incdir, install : true) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..4c094471 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('notifications', type: 'feature', value: 'auto', description: 'enable desktop notifications')