about summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-04T19·20-0500
committerVincent Ambo <tazjin@google.com>2020-05-17T14·57+0100
commit939cec746edca8c00893cd72e5d8556eecdb367f (patch)
tree1ba47cce7b3386b61ba61263d207d79128c94e86 /third_party
parentadff9913c02737d25a53d8f3695b51a301cff117 (diff)
chore(3p/nix): Clean up libseccomp_dep r/737
(cherry picked from commit b380f75867d48e6af461513d26803b61250d9c80)
Diffstat (limited to 'third_party')
-rw-r--r--third_party/nix/meson.build13
1 files changed, 7 insertions, 6 deletions
diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build
index 44c858d9d8..afa0f3255d 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'))