From 9c21176f5779d5757cfc38497873bb0e13eb4f0b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 26 Oct 2019 05:16:39 -0400 Subject: chore(3p/nix): Make libsodium an auto dependency This means do autodetection if the user doesn't specify. (cherry picked from commit 1be6ab4d3eb4d6b04c322b9ed0a108c2b5354ec5) --- third_party/nix/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'third_party/nix/meson.build') diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build index 50d4dfc0c9..9e20c499f3 100644 --- a/third_party/nix/meson.build +++ b/third_party/nix/meson.build @@ -474,9 +474,10 @@ endif # Look for libsodium, an optional dependency. #-------------------------------------------------- -if (get_option('with_libsodium')) +libsodium_lib = cpp.find_library('sodium', required: get_option('with_libsodium')) +if (libsodium_lib.found()) libsodium_dep = declare_dependency( - dependencies : cpp.find_library('sodium'), + dependencies : libsodium_lib, link_args : get_option('sodium_link_args')) config_h.set('HAVE_SODIUM', 1, description : 'Whether to use libsodium for cryptography.') else -- cgit 1.4.1