[libcamera-devel] [PATCH 07/10] libcamera: make libdl optional when provided
Jacopo Mondi
jacopo at jmondi.org
Thu Oct 27 18:46:47 CEST 2022
Hi Nicholas
On Thu, Oct 27, 2022 at 12:55:12AM -0500, Nicholas Roth via libcamera-devel wrote:
> From: Nicholas Roth <nicholas at rothemail.net>
>
> Currently, libdl is always required. Sometimes, the C++ runtime includes
> a dynamic loader, which is the case for Android. Additionally, Android
> 11 does not have libdl. This fix allows libcamera to build on Android.
>
> Signed-off-by: Nicholas Roth <nicholas at rothemail.net>
I'm not the best person to comment on build-system related issues, but
this seems ok to me
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Thanks
j
> ---
> src/libcamera/meson.build | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index 5f39d2e2..0494e808 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -65,7 +65,12 @@ subdir('ipa')
> subdir('pipeline')
> subdir('proxy')
>
> -libdl = cc.find_library('dl')
> +null_dep = dependency('', required : false)
> +
> +libdl = null_dep
> +if not cc.has_function('dlopen')
> + libdl = cc.find_library('dl')
> +endif
> libudev = dependency('libudev', required : false)
> libyaml = dependency('yaml-0.1', required : false)
>
> --
> 2.34.1
>
More information about the libcamera-devel
mailing list