summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/android/meson.build19
-rw-r--r--src/libcamera/meson.build2
-rw-r--r--src/meson.build4
3 files changed, 16 insertions, 9 deletions
diff --git a/src/android/meson.build b/src/android/meson.build
index ecb92f6e..0293c203 100644
--- a/src/android/meson.build
+++ b/src/android/meson.build
@@ -1,5 +1,19 @@
# SPDX-License-Identifier: CC0-1.0
+android_deps = [
+ dependency('libexif', required : get_option('android')),
+ dependency('libjpeg', required : get_option('android')),
+]
+
+android_enabled = true
+
+foreach dep : android_deps
+ if not dep.found()
+ android_enabled = false
+ subdir_done()
+ endif
+endforeach
+
android_hal_sources = files([
'camera3_hal.cpp',
'camera_hal_manager.cpp',
@@ -14,11 +28,6 @@ android_camera_metadata_sources = files([
'metadata/camera_metadata.c',
])
-android_deps = [
- dependency('libexif'),
- dependency('libjpeg'),
-]
-
android_camera_metadata = static_library('camera_metadata',
android_camera_metadata_sources,
include_directories : android_includes)
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index af2f3d95..0e6ecf50 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -121,7 +121,7 @@ libcamera_deps = [
libcamera_link_with = []
-if get_option('android')
+if android_enabled
libcamera_sources += android_hal_sources
includes += android_includes
libcamera_link_with += android_camera_metadata
diff --git a/src/meson.build b/src/meson.build
index d69b4c1e..0c5b64d6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: CC0-1.0
-if get_option('android')
- subdir('android')
-endif
+subdir('android')
openssl = find_program('openssl', required : true)
if openssl.found()