[libcamera-devel] [PATCH 02/16] android: cros: Simplify integration
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Fri Jun 25 04:59:39 CEST 2021
Hi Kieran,
On Fri, Jun 25, 2021 at 02:35:25AM +0100, Kieran Bingham wrote:
> The ChromeOS specific Android HAL support was overly-complex to support
> linking an additional library, and then passing the built object into
> the libcamera.so build.
>
> Now that it has its own distinct libcamera-hal.so, simplify the CrOS
> integration to build directly into that library.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> src/android/cros/meson.build | 11 +++--------
> src/android/meson.build | 13 +++----------
> 2 files changed, 6 insertions(+), 18 deletions(-)
>
> diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build
> index c2bda70838e2..35995dd814a2 100644
> --- a/src/android/cros/meson.build
> +++ b/src/android/cros/meson.build
> @@ -4,15 +4,10 @@ if get_option('android_platform') != 'cros'
> subdir_done()
> endif
>
> -cros_hal_info_sources = files([
> +android_hal_sources += files([
> 'camera3_hal.cpp',
> ])
>
> -cros_hal_info = static_library('cros_hal_info',
> - cros_hal_info_sources,
> - dependencies : dependency('libcros_camera'),
> - c_args : '-Wno-shadow',
> - include_directories : [android_includes,
> - libcamera_includes])
> +android_deps += dependency('libcros_camera')
>
> -android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')
> +android_cpp_args += ['-DOS_CHROMEOS']
> diff --git a/src/android/meson.build b/src/android/meson.build
> index feda3e0998bd..bd58ef964c2a 100644
> --- a/src/android/meson.build
> +++ b/src/android/meson.build
> @@ -37,15 +37,6 @@ endif
>
> android_deps += [libyuv_dep]
>
> -android_cpp_args = []
> -android_objects = []
> -
> -if get_option('android_platform') == 'cros'
> - android_cpp_args += ['-DOS_CHROMEOS']
> -endif
> -
> -subdir('cros')
> -
> android_hal_sources = files([
> 'camera3_hal.cpp',
> 'camera_capabilities.cpp',
> @@ -63,6 +54,9 @@ android_hal_sources = files([
> 'yuv/post_processor_yuv.cpp'
> ])
>
> +android_cpp_args = []
> +
> +subdir('cros')
> subdir('mm')
>
> android_camera_metadata_sources = files([
> @@ -80,6 +74,5 @@ libcamera_hal = shared_library('libcamera-hal',
> link_with : android_camera_metadata,
> install : true,
> cpp_args : android_cpp_args,
> - objects : android_objects,
> include_directories : android_includes,
> dependencies : android_deps)
> --
> 2.30.2
>
More information about the libcamera-devel
mailing list