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

paul.elder at ideasonboard.com paul.elder at ideasonboard.com
Thu Apr 29 05:06:24 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>
> ---
> 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.

For the IPA, only the interface header is necessary. Pipeline handlers
need both the interface header and the proxy header. All of the other
generated files are internals.


Paul

> ---
>  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')
>  #
>  # 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',
> -- 
> 2.26.2
> 
> _______________________________________________
> 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