From 939cec746edca8c00893cd72e5d8556eecdb367f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 4 Nov 2019 14:20:15 -0500 Subject: chore(3p/nix): Clean up libseccomp_dep (cherry picked from commit b380f75867d48e6af461513d26803b61250d9c80) --- third_party/nix/meson.build | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build index 44c858d9d8da..afa0f3255d51 100644 --- a/third_party/nix/meson.build +++ b/third_party/nix/meson.build @@ -520,15 +520,16 @@ endif # OS Specific checks #============================================================================ # Look for libsecppomp, required for Linux sandboxing. -libseccomp_dep = '' if sys_name.contains('linux') - libseccomp_dep = dependency('libseccomp', version : '>= 2.3.1', required: false) - if not (libseccomp_dep.found()) - error('Nix requires libseccomp on a linux host system') - endif + libseccomp_dep = dependency( + 'libseccomp', + version : '>= 2.3.1', + not_found_message : 'Nix requires libseccomp on a linux host system') config_h.set( 'HAVE_SECCOMP', 1, - description : 'Whether seccomp is available and should be used for sandboxing.') + description : 'Whether seccomp is available and should be used for sandboxing.') +else + libseccomp_dep = dependency('', required: false) endif if (sys_name.contains('freebsd')) -- cgit 1.4.1