summaryrefslogtreecommitdiff
path: root/src/apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/apps')
-rw-r--r--src/apps/cam/meson.build4
-rw-r--r--src/apps/lc-compliance/meson.build3
-rw-r--r--src/apps/meson.build10
3 files changed, 12 insertions, 5 deletions
diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build
index 06dbea06..4b6099dd 100644
--- a/src/apps/cam/meson.build
+++ b/src/apps/cam/meson.build
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: CC0-1.0
-libevent = dependency('libevent_pthreads', required : get_option('cam'))
-
-if not libevent.found()
+if opt_cam.disabled() or not libevent.found()
cam_enabled = false
subdir_done()
endif
diff --git a/src/apps/lc-compliance/meson.build b/src/apps/lc-compliance/meson.build
index 8b57474b..05d622be 100644
--- a/src/apps/lc-compliance/meson.build
+++ b/src/apps/lc-compliance/meson.build
@@ -1,10 +1,9 @@
# SPDX-License-Identifier: CC0-1.0
-libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))
libgtest = dependency('gtest', required : get_option('lc-compliance'),
fallback : ['gtest', 'gtest_dep'])
-if not (libevent.found() and libgtest.found())
+if opt_lc_compliance.disabled() or not libevent.found() or not libgtest.found()
lc_compliance_enabled = false
subdir_done()
endif
diff --git a/src/apps/meson.build b/src/apps/meson.build
index 9e4388bd..62cff67e 100644
--- a/src/apps/meson.build
+++ b/src/apps/meson.build
@@ -1,5 +1,15 @@
# SPDX-License-Identifier: CC0-1.0
+opt_cam = get_option('cam')
+opt_lc_compliance = get_option('lc-compliance')
+
+# libevent is needed by cam and lc-compliance. As they are both feature options,
+# they can't be combined with simple boolean logic.
+libevent = dependency('libevent_pthreads', required : opt_cam)
+if not libevent.found()
+ libevent = dependency('libevent_pthreads', required : opt_lc_compliance)
+endif
+
subdir('lc-compliance')
subdir('cam')