<div dir="ltr"><div dir="ltr">Hi Kieran, thank you for the patch.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 15, 2021 at 4:23 AM Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Kieran,<br>
<br>
Thank you for the patch.<br>
<br>
s/it's/its/ in the subject line.<br>
<br>
On Mon, Jun 14, 2021 at 01:05:06PM +0100, Kieran Bingham wrote:<br>
> The libcamera Android HAL implementation should not be an integral part<br>
> of libcamera, but a support library that utilises the libcamera public<br>
> API.<br>
> <br>
> Move the implementation to it's own distinct library.<br>
<br>
And here too :-)<br>
<br>
> Signed-off-by: Kieran Bingham <<a href="mailto:kieran.bingham@ideasonboard.com" target="_blank">kieran.bingham@ideasonboard.com</a>><br>
<br>
Reviewed-by: Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank">laurent.pinchart@ideasonboard.com</a>><br>
<br></blockquote><div><br></div><div>Reviewed-by: Hirokazu Honda <<a href="mailto:hiroh@chromium.org">hiroh@chromium.org</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> ---<br>
> src/android/meson.build | 12 +++++++++++-<br>
> src/libcamera/meson.build | 11 -----------<br>
> src/meson.build | 7 +++----<br>
> 3 files changed, 14 insertions(+), 16 deletions(-)<br>
> <br>
> diff --git a/src/android/meson.build b/src/android/meson.build<br>
> index 3893e5b5b832..6edaa1185905 100644<br>
> --- a/src/android/meson.build<br>
> +++ b/src/android/meson.build<br>
> @@ -4,6 +4,7 @@ android_deps = [<br>
> dependency('libexif', required : get_option('android')),<br>
> dependency('libjpeg', required : get_option('android')),<br>
> dependency('yaml-0.1', required : get_option('android')),<br>
> + libcamera_dep,<br>
> ]<br>
> <br>
> android_enabled = true<br>
> @@ -37,7 +38,7 @@ endif<br>
> android_deps += [libyuv_dep]<br>
> <br>
> if get_option('android_platform') == 'cros'<br>
> - libcamera_cpp_args += [ '-DOS_CHROMEOS']<br>
> + libcamera_cpp_args += ['-DOS_CHROMEOS']<br>
> endif<br>
> <br>
> subdir('cros')<br>
> @@ -68,3 +69,12 @@ android_camera_metadata = static_library('camera_metadata',<br>
> android_camera_metadata_sources,<br>
> c_args : '-Wno-shadow',<br>
> include_directories : android_includes)<br>
> +<br>
> +libcamera_hal = shared_library('libcamera-hal',<br>
> + android_hal_sources,<br>
> + name_prefix : '',<br>
> + link_with : android_camera_metadata,<br>
> + install : true,<br>
> + cpp_args : libcamera_cpp_args,<br>
> + include_directories : android_includes,<br>
> + dependencies : android_deps)<br>
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build<br>
> index 7e19a1774a59..54512652272c 100644<br>
> --- a/src/libcamera/meson.build<br>
> +++ b/src/libcamera/meson.build<br>
> @@ -130,16 +130,6 @@ libcamera_deps = [<br>
> dependency('threads'),<br>
> ]<br>
> <br>
> -libcamera_link_with = []<br>
> -<br>
> -if android_enabled<br>
> - libcamera_sources += android_hal_sources<br>
> - includes += android_includes<br>
> - libcamera_link_with += android_camera_metadata<br>
> -<br>
> - libcamera_deps += android_deps<br>
> -endif<br>
> -<br>
> # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.<br>
> # The build_rpath is stripped at install time by meson, so we determine at<br>
> # runtime if the library is running from an installed location by checking<br>
> @@ -148,7 +138,6 @@ endif<br>
> libcamera = shared_library('camera',<br>
> libcamera_sources,<br>
> install : true,<br>
> - link_with : libcamera_link_with,<br>
> cpp_args : libcamera_cpp_args,<br>
> include_directories : includes,<br>
> objects : libcamera_objects,<br>
> diff --git a/src/meson.build b/src/meson.build<br>
> index edb7ce14f7a6..a6e4eb21b796 100644<br>
> --- a/src/meson.build<br>
> +++ b/src/meson.build<br>
> @@ -23,11 +23,10 @@ endif<br>
> libcamera_cpp_args = []<br>
> libcamera_objects = []<br>
> <br>
> -# The 'android' subdir must be processed first, and the build targets<br>
> -# are included directly into the libcamera library when this is enabled.<br>
> -subdir('android')<br>
> -<br>
> +# libcamera must be built first as a dependency to the other components.<br>
> subdir('libcamera')<br>
> +<br>
> +subdir('android')<br>
> subdir('ipa')<br>
> <br>
> subdir('lc-compliance')<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div></div>