summaryrefslogtreecommitdiff
path: root/src/android/mm/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/mm/meson.build')
-rw-r--r--src/android/mm/meson.build12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/android/mm/meson.build b/src/android/mm/meson.build
index 85f12f91..e3e0484c 100644
--- a/src/android/mm/meson.build
+++ b/src/android/mm/meson.build
@@ -4,10 +4,14 @@ platform = get_option('android_platform')
if platform == 'generic'
android_hal_sources += files(['generic_camera_buffer.cpp',
'generic_frame_buffer_allocator.cpp'])
- android_deps += [
- libdl,
- dependency('libhardware'),
- ]
+ android_deps += [libdl]
+
+ libhardware = dependency('libhardware', required : false)
+ if libhardware.found()
+ android_deps += [libhardware]
+ else
+ android_hal_sources += files(['libhardware_stub.c'])
+ endif
elif platform == 'cros'
android_hal_sources += files(['cros_camera_buffer.cpp',
'cros_frame_buffer_allocator.cpp'])