[libcamera-devel] [RFC PATCH 4/8] src: meson: Define system paths

Jacopo Mondi jacopo at jmondi.org
Tue Nov 24 22:26:54 CET 2020


Hi Kieran,

On Mon, Nov 23, 2020 at 04:43:15PM +0000, Kieran Bingham wrote:
> Define libcamera specific system paths for use within the library code
> base. These can be used to identify system configuration files and
> shared data.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

Looking at this and the following patch, all the here defined
libcamera_$something variables are always used in conjunction with
'prefix'.

Is it worth defining them in that way already ?

> ---
>  src/meson.build | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/meson.build b/src/meson.build
> index 8c7449f9b8a0..b1b3514f6ed7 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -1,5 +1,17 @@
>  # SPDX-License-Identifier: CC0-1.0
>
> +# Handle system paths
> +datadir = get_option('datadir')
> +prefix = get_option('prefix')
> +sysconfdir = get_option('sysconfdir')
> +
> +libcamera_datadir = datadir / 'libcamera'
> +libcamera_sysconfdir = sysconfdir / 'libcamera'
libcamera_datadir = prefix / datadir / 'libcamera'
libcamera_sysconfdir = prefix / sysconfdir / 'libcamera'

same for the libcamera_libdir introduced in the next patch

Anyway, this is better than what we have
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
   j

> +
> +config_h.set('LIBCAMERA_SYSCONF_DIR', '"' + prefix / libcamera_sysconfdir + '"')
> +config_h.set('LIBCAMERA_DATA_DIR', '"' + prefix / libcamera_datadir + '"')
> +
> +# Module Signing
>  openssl = find_program('openssl', required : true)
>  if openssl.found()
>      ipa_priv_key = custom_target('ipa-priv-key',
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list