[libcamera-devel,v3,1/3] include: base: Do not install private headers
diff mbox series

Message ID 20230704142435.3490823-2-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • Use x.y soname versioning
Related show

Commit Message

Kieran Bingham July 4, 2023, 2:24 p.m. UTC
Split the public and private headers from the base library and stop installing
private headers as part of the install process.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 include/libcamera/base/meson.build | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

Comments

Laurent Pinchart July 4, 2023, 2:29 p.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Tue, Jul 04, 2023 at 03:24:33PM +0100, Kieran Bingham via libcamera-devel wrote:
> Split the public and private headers from the base library and stop installing
> private headers as part of the install process.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  include/libcamera/base/meson.build | 28 ++++++++++++++++++----------
>  1 file changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
> index 4410aba8181a..ee91bd1e0071 100644
> --- a/include/libcamera/base/meson.build
> +++ b/include/libcamera/base/meson.build
> @@ -2,31 +2,39 @@
>  
>  libcamera_base_include_dir = libcamera_include_dir / 'base'
>  
> -libcamera_base_headers = files([
> -    'backtrace.h',
> +libcamera_base_public_headers = files([
>      'bound_method.h',
>      'class.h',
>      'compiler.h',
> +    'flags.h',
> +    'object.h',
> +    'shared_fd.h',
> +    'signal.h',
> +    'span.h',
> +    'thread_annotations.h',
> +    'unique_fd.h',
> +])
> +
> +libcamera_base_private_headers = files([
> +    'backtrace.h',
>      'event_dispatcher.h',
>      'event_dispatcher_poll.h',
>      'event_notifier.h',
>      'file.h',
> -    'flags.h',
>      'log.h',
>      'message.h',
>      'mutex.h',
> -    'object.h',
>      'private.h',
>      'semaphore.h',
> -    'shared_fd.h',
> -    'signal.h',
> -    'span.h',
>      'thread.h',
> -    'thread_annotations.h',
>      'timer.h',
> -    'unique_fd.h',
>      'utils.h',
>  ])
>  
> -install_headers(libcamera_base_headers,
> +libcamera_base_headers = [
> +    libcamera_base_public_headers,
> +    libcamera_base_private_headers,
> +]
> +
> +install_headers(libcamera_base_public_headers,
>                  subdir: libcamera_base_include_dir)
Umang Jain July 4, 2023, 6:32 p.m. UTC | #2
Hi Kieran,

On 7/4/23 4:24 PM, Kieran Bingham via libcamera-devel wrote:
> Split the public and private headers from the base library and stop installing
> private headers as part of the install process.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>   include/libcamera/base/meson.build | 28 ++++++++++++++++++----------
>   1 file changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
> index 4410aba8181a..ee91bd1e0071 100644
> --- a/include/libcamera/base/meson.build
> +++ b/include/libcamera/base/meson.build
> @@ -2,31 +2,39 @@
>   
>   libcamera_base_include_dir = libcamera_include_dir / 'base'
>   
> -libcamera_base_headers = files([
> -    'backtrace.h',
> +libcamera_base_public_headers = files([
>       'bound_method.h',
>       'class.h',
>       'compiler.h',
> +    'flags.h',
> +    'object.h',
> +    'shared_fd.h',
> +    'signal.h',
> +    'span.h',
> +    'thread_annotations.h',

Does thread annotation should go public ?

Other than it,

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> +    'unique_fd.h',
> +])
> +
> +libcamera_base_private_headers = files([
> +    'backtrace.h',
>       'event_dispatcher.h',
>       'event_dispatcher_poll.h',
>       'event_notifier.h',
>       'file.h',
> -    'flags.h',
>       'log.h',
>       'message.h',
>       'mutex.h',
> -    'object.h',
>       'private.h',
>       'semaphore.h',
> -    'shared_fd.h',
> -    'signal.h',
> -    'span.h',
>       'thread.h',
> -    'thread_annotations.h',
>       'timer.h',
> -    'unique_fd.h',
>       'utils.h',
>   ])
>   
> -install_headers(libcamera_base_headers,
> +libcamera_base_headers = [
> +    libcamera_base_public_headers,
> +    libcamera_base_private_headers,
> +]
> +
> +install_headers(libcamera_base_public_headers,
>                   subdir: libcamera_base_include_dir)

Patch
diff mbox series

diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index 4410aba8181a..ee91bd1e0071 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -2,31 +2,39 @@ 
 
 libcamera_base_include_dir = libcamera_include_dir / 'base'
 
-libcamera_base_headers = files([
-    'backtrace.h',
+libcamera_base_public_headers = files([
     'bound_method.h',
     'class.h',
     'compiler.h',
+    'flags.h',
+    'object.h',
+    'shared_fd.h',
+    'signal.h',
+    'span.h',
+    'thread_annotations.h',
+    'unique_fd.h',
+])
+
+libcamera_base_private_headers = files([
+    'backtrace.h',
     'event_dispatcher.h',
     'event_dispatcher_poll.h',
     'event_notifier.h',
     'file.h',
-    'flags.h',
     'log.h',
     'message.h',
     'mutex.h',
-    'object.h',
     'private.h',
     'semaphore.h',
-    'shared_fd.h',
-    'signal.h',
-    'span.h',
     'thread.h',
-    'thread_annotations.h',
     'timer.h',
-    'unique_fd.h',
     'utils.h',
 ])
 
-install_headers(libcamera_base_headers,
+libcamera_base_headers = [
+    libcamera_base_public_headers,
+    libcamera_base_private_headers,
+]
+
+install_headers(libcamera_base_public_headers,
                 subdir: libcamera_base_include_dir)