[libcamera-devel] [RFC PATCH] ipa: meson: Install mojom generated headers to include paths

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Apr 28 16:03:04 CEST 2021


Hi Umang,

On Wed, Apr 28, 2021 at 07:03:18PM +0530, Umang Jain wrote:
> Generated IPA headers from mojom files need to be installed sy
> $INCLUDE_PATH in order to be available system-wide. Without this,
> out-of-tree IPAs won't be able to link and build themselves.
> 
> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>

I've discussed the more global issue of out-of-tree IPA modules with
Kieran, I'll let him lead that effort with you. This patch could be fine
as part of the solution, but has to be checked with the big picture in
mind. I think only the interface files need to be installed though, the
serializer and proxy headers shouldn't be needed by IPA modules.

> ---
> Marked as RFC to discuss:
> - Whether it makes sense to provide -ipa_serializer.h
>   and -ipa_proxy.h system-wide too? I am not 100%s sure yet.
> ---
>  include/libcamera/ipa/meson.build | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build
> index 2d72c1fc..096bd4dd 100644
> --- a/include/libcamera/ipa/meson.build
> +++ b/include/libcamera/ipa/meson.build
> @@ -11,6 +11,8 @@ install_headers(libcamera_ipa_headers,
>  
>  libcamera_generated_ipa_headers = []
>  
> +generated_ipa_headers_include_path = join_paths(get_option('prefix'),'include',
> +                                                libcamera_include_dir, 'ipa')

You can use the meson / operator instead of join_paths.

>  #
>  # Prepare IPA/IPC generation components
>  #
> @@ -31,6 +33,8 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_interface_h',
>                    input : ipa_mojom_core,
>                    output : 'core_ipa_interface.h',
>                    depends : mojom_templates,
> +                  install: true,
> +                  install_dir: generated_ipa_headers_include_path,
>                    command : [
>                        mojom_generator, 'generate',
>                        '-g', 'libcamera',
> @@ -45,6 +49,8 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',
>                    input : ipa_mojom_core,
>                    output : 'core_ipa_serializer.h',
>                    depends : mojom_templates,
> +                  install: true,
> +                  install_dir: generated_ipa_headers_include_path,
>                    command : [
>                        mojom_generator, 'generate',
>                        '-g', 'libcamera',
> @@ -93,6 +99,8 @@ foreach file : ipa_mojom_files
>                             input : mojom,
>                             output : name + '_ipa_interface.h',
>                             depends : mojom_templates,
> +                           install: true,
> +                           install_dir: generated_ipa_headers_include_path,
>                             command : [
>                                 mojom_generator, 'generate',
>                                 '-g', 'libcamera',
> @@ -107,6 +115,8 @@ foreach file : ipa_mojom_files
>                                 input : mojom,
>                                 output : name + '_ipa_serializer.h',
>                                 depends : mojom_templates,
> +                               install: true,
> +                               install_dir: generated_ipa_headers_include_path,
>                                 command : [
>                                     mojom_generator, 'generate',
>                                     '-g', 'libcamera',
> @@ -121,6 +131,8 @@ foreach file : ipa_mojom_files
>                                   input : mojom,
>                                   output : name + '_ipa_proxy.h',
>                                   depends : mojom_templates,
> +                                 install: true,
> +                                 install_dir: generated_ipa_headers_include_path,
>                                   command : [
>                                       mojom_generator, 'generate',
>                                       '-g', 'libcamera',

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list