From 28476e578b4ad7cb05763d142698de6d1a9d72f0 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 1 Dec 2021 19:46:34 +0100 Subject: [PATCH] build: add conditional omemo sources --- meson.build | 1 + src/meson.build | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/meson.build b/meson.build index 2f0119d0..13cb4f98 100644 --- a/meson.build +++ b/meson.build @@ -110,6 +110,7 @@ profanity = executable('profanity', pgp_dep, omemo_libsignal_dep, omemo_gcrypt_dep, + omemo_internal_dep, screensaver_xss_dep, screensaver_x11_dep, icons_clipboard_gtk_dep, diff --git a/src/meson.build b/src/meson.build index 6bb639ab..f7656734 100644 --- a/src/meson.build +++ b/src/meson.build @@ -93,3 +93,16 @@ if otr_dep.found() otr_internal_dep = declare_dependency(sources: otr_sources, include_directories: include_directories('otr'), dependencies: otr_dep) endif + +omemo_internal_dep = declare_dependency() +if omemo_libsignal_dep.found() and omemo_gcrypt_dep.found() + omemo_sources = [ files('omemo/omemo.c', + 'omemo/crypto.c', + 'omemo/store.c', + 'xmpp/omemo.c', + 'tools/aesgcm_download.c' + ) + ] + + omemo_internal_dep = declare_dependency(sources: omemo_sources, include_directories: include_directories('omemo')) +endif