summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-04-30 14:18:52 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 16:09:46 +0100
commit63c46875376031141e6e9bda694dcb5d59fb8d4b (patch)
tree72d2a298b3f90620d63db0e36892e949acebe752 /src/android
parent53a0d80af0f9983d6bc0d54b0e85403a08721488 (diff)
android: Split HAL to its own shared library
The libcamera Android HAL implementation should not be an integral part of libcamera, but a support library that utilises the libcamera public API. Move the implementation to its own distinct library. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/cros/meson.build2
-rw-r--r--src/android/meson.build16
2 files changed, 16 insertions, 2 deletions
diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build
index 13ec8f0a..c2bda708 100644
--- a/src/android/cros/meson.build
+++ b/src/android/cros/meson.build
@@ -15,4 +15,4 @@ cros_hal_info = static_library('cros_hal_info',
include_directories : [android_includes,
libcamera_includes])
-libcamera_objects += cros_hal_info.extract_objects('camera3_hal.cpp')
+android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')
diff --git a/src/android/meson.build b/src/android/meson.build
index 6270fb20..feda3e09 100644
--- a/src/android/meson.build
+++ b/src/android/meson.build
@@ -4,6 +4,7 @@ android_deps = [
dependency('libexif', required : get_option('android')),
dependency('libjpeg', required : get_option('android')),
dependency('yaml-0.1', required : get_option('android')),
+ libcamera_dep,
]
android_enabled = true
@@ -36,8 +37,11 @@ endif
android_deps += [libyuv_dep]
+android_cpp_args = []
+android_objects = []
+
if get_option('android_platform') == 'cros'
- libcamera_cpp_args += [ '-DOS_CHROMEOS']
+ android_cpp_args += ['-DOS_CHROMEOS']
endif
subdir('cros')
@@ -69,3 +73,13 @@ android_camera_metadata = static_library('camera_metadata',
android_camera_metadata_sources,
c_args : '-Wno-shadow',
include_directories : android_includes)
+
+libcamera_hal = shared_library('libcamera-hal',
+ android_hal_sources,
+ name_prefix : '',
+ link_with : android_camera_metadata,
+ install : true,
+ cpp_args : android_cpp_args,
+ objects : android_objects,
+ include_directories : android_includes,
+ dependencies : android_deps)