[libcamera-devel] [RFC PATCH 3/6] meson: ipa: Use files() to locate the mojom files
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon May 24 15:29:43 CEST 2021
Hi Paul,
Thank you for the patch.
On Mon, May 24, 2021 at 05:40:26PM +0900, Paul Elder wrote:
> Use meson's files() to list the mojom files instead of the file names
> directly. This is so that we can still access the files from
> src/libcamera/ipa/meson.build later for building documentation cpp
> files from the mojom files.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> include/libcamera/ipa/meson.build | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build
> index eca4e9ee..c7fa5cd7 100644
> --- a/include/libcamera/ipa/meson.build
> +++ b/include/libcamera/ipa/meson.build
> @@ -58,12 +58,12 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',
> './' +'@INPUT@'
> ])
>
> -ipa_mojom_files = [
> +ipa_mojom_files = files([
> 'ipu3.mojom',
> 'raspberrypi.mojom',
> 'rkisp1.mojom',
> 'vimc.mojom',
> -]
> +])
>
> ipa_mojoms = []
>
> @@ -74,16 +74,16 @@ ipa_mojoms = []
> # TODO Define per-pipeline ControlInfoMap with yaml?
>
> foreach file : ipa_mojom_files
> - name = file.split('.')[0]
> + name = '@0@'.format(file).split('/')[-1].split('.')[0]
>
> if name not in pipelines
> continue
> endif
>
> # {pipeline}.mojom-module
> - mojom = custom_target(file.split('.')[0] + '_mojom_module',
> + mojom = custom_target(name + '_mojom_module',
> input : file,
> - output : file + '-module',
> + output : name + '.mojom-module',
> depends : ipa_mojom_core,
> command : [
> mojom_parser,
You could also just do
ipa_mojom_files = files(ipa_mojom_files)
below this loop.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list