[libcamera-devel,RFC,2/8] src: meson: Re-order subdir layout
diff mbox series

Message ID 20201123164319.152742-3-kieran.bingham@ideasonboard.com
State Superseded
Headers show
Series
  • Configuration files and parsing
Related show

Commit Message

Kieran Bingham Nov. 23, 2020, 4:43 p.m. UTC
Move the android subdir below the configuration options to keep all
subdirs together.

Add a comment explaining why android must come first, and some padding
to group the libcamera and ipa components, applications, and remaining
adaptation layers.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jacopo Mondi Nov. 24, 2020, 8:56 p.m. UTC | #1
Hi Kieran,

On Mon, Nov 23, 2020 at 04:43:13PM +0000, Kieran Bingham wrote:
> Move the android subdir below the configuration options to keep all
> subdirs together.
>
> Add a comment explaining why android must come first, and some padding
> to group the libcamera and ipa components, applications, and remaining
> adaptation layers.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/meson.build | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/meson.build b/src/meson.build
> index b9c7e7599d61..27f70544f1f6 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -1,7 +1,5 @@
>  # SPDX-License-Identifier: CC0-1.0
>
> -subdir('android')
> -
>  openssl = find_program('openssl', required : true)
>  if openssl.found()
>      ipa_priv_key = custom_target('ipa-priv-key',
> @@ -13,8 +11,12 @@ else
>      ipa_sign_module = false
>  endif
>
> +# The Android HAL must be built before, and is included in libcamera.

well, to be picky, I think it's because of how we add the
android_hal_sources and the metadata library definition that we reuse
in the src/libcamera/meson.build file when building the library.

It's then mostly about how we instrumented the build system I think

# The 'android' subdir must be listed first, as build targets there
# defined are required when building libcamera

Just an idea

Whatever is fine,really
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> +subdir('android')
> +
>  subdir('libcamera')
>  subdir('ipa')
> +
>  subdir('cam')
>  subdir('qcam')
>
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Kieran Bingham Nov. 24, 2020, 9:10 p.m. UTC | #2
Hi Jacopo,

On 24/11/2020 20:56, Jacopo Mondi wrote:
> Hi Kieran,
> 
> On Mon, Nov 23, 2020 at 04:43:13PM +0000, Kieran Bingham wrote:
>> Move the android subdir below the configuration options to keep all
>> subdirs together.
>>
>> Add a comment explaining why android must come first, and some padding
>> to group the libcamera and ipa components, applications, and remaining
>> adaptation layers.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> ---
>>  src/meson.build | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/meson.build b/src/meson.build
>> index b9c7e7599d61..27f70544f1f6 100644
>> --- a/src/meson.build
>> +++ b/src/meson.build
>> @@ -1,7 +1,5 @@
>>  # SPDX-License-Identifier: CC0-1.0
>>
>> -subdir('android')
>> -
>>  openssl = find_program('openssl', required : true)
>>  if openssl.found()
>>      ipa_priv_key = custom_target('ipa-priv-key',
>> @@ -13,8 +11,12 @@ else
>>      ipa_sign_module = false
>>  endif
>>
>> +# The Android HAL must be built before, and is included in libcamera.
> 
> well, to be picky, I think it's because of how we add the
> android_hal_sources and the metadata library definition that we reuse
> in the src/libcamera/meson.build file when building the library.
> 
> It's then mostly about how we instrumented the build system I think
> 
> # The 'android' subdir must be listed first, as build targets there
> # defined are required when building libcamera
> 

It's a good point. The android layer isn't built during this subdir call
- it's just processed, and the build targets collected into a variable
which gets built into the main library I believe.

How about
# The 'android' subdir must be processed first, and the build targets
# are included directly into the libcamera library when this is enabled.

> Just an idea
> 
> Whatever is fine,really
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> 
> Thanks
>   j
> 
>> +subdir('android')
>> +
>>  subdir('libcamera')
>>  subdir('ipa')
>> +
>>  subdir('cam')
>>  subdir('qcam')
>>
>> --
>> 2.25.1
>>
>> _______________________________________________
>> libcamera-devel mailing list
>> libcamera-devel@lists.libcamera.org
>> https://lists.libcamera.org/listinfo/libcamera-devel
Jacopo Mondi Nov. 24, 2020, 9:22 p.m. UTC | #3
Hi Kieran

On Tue, Nov 24, 2020 at 09:10:29PM +0000, Kieran Bingham wrote:
> Hi Jacopo,
>
> On 24/11/2020 20:56, Jacopo Mondi wrote:
> > Hi Kieran,
> >
> > On Mon, Nov 23, 2020 at 04:43:13PM +0000, Kieran Bingham wrote:
> >> Move the android subdir below the configuration options to keep all
> >> subdirs together.
> >>
> >> Add a comment explaining why android must come first, and some padding
> >> to group the libcamera and ipa components, applications, and remaining
> >> adaptation layers.
> >>
> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >> ---
> >>  src/meson.build | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/src/meson.build b/src/meson.build
> >> index b9c7e7599d61..27f70544f1f6 100644
> >> --- a/src/meson.build
> >> +++ b/src/meson.build
> >> @@ -1,7 +1,5 @@
> >>  # SPDX-License-Identifier: CC0-1.0
> >>
> >> -subdir('android')
> >> -
> >>  openssl = find_program('openssl', required : true)
> >>  if openssl.found()
> >>      ipa_priv_key = custom_target('ipa-priv-key',
> >> @@ -13,8 +11,12 @@ else
> >>      ipa_sign_module = false
> >>  endif
> >>
> >> +# The Android HAL must be built before, and is included in libcamera.
> >
> > well, to be picky, I think it's because of how we add the
> > android_hal_sources and the metadata library definition that we reuse
> > in the src/libcamera/meson.build file when building the library.
> >
> > It's then mostly about how we instrumented the build system I think
> >
> > # The 'android' subdir must be listed first, as build targets there
> > # defined are required when building libcamera
> >
>
> It's a good point. The android layer isn't built during this subdir call
> - it's just processed, and the build targets collected into a variable
> which gets built into the main library I believe.
>
> How about
> # The 'android' subdir must be processed first, and the build targets
> # are included directly into the libcamera library when this is enabled.
>

Even better ;)

Thanks
   j

> > Just an idea
> >
> > Whatever is fine,really
> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> >
> > Thanks
> >   j
> >
> >> +subdir('android')
> >> +
> >>  subdir('libcamera')
> >>  subdir('ipa')
> >> +
> >>  subdir('cam')
> >>  subdir('qcam')
> >>
> >> --
> >> 2.25.1
> >>
> >> _______________________________________________
> >> libcamera-devel mailing list
> >> libcamera-devel@lists.libcamera.org
> >> https://lists.libcamera.org/listinfo/libcamera-devel
>
> --
> Regards
> --
> Kieran
Laurent Pinchart Dec. 1, 2020, 5:14 p.m. UTC | #4
Hi Kieran,

Thank you for the patch.

On Tue, Nov 24, 2020 at 09:10:29PM +0000, Kieran Bingham wrote:
> On 24/11/2020 20:56, Jacopo Mondi wrote:
> > On Mon, Nov 23, 2020 at 04:43:13PM +0000, Kieran Bingham wrote:
> >> Move the android subdir below the configuration options to keep all
> >> subdirs together.
> >>
> >> Add a comment explaining why android must come first, and some padding
> >> to group the libcamera and ipa components, applications, and remaining
> >> adaptation layers.
> >>
> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >> ---
> >>  src/meson.build | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/src/meson.build b/src/meson.build
> >> index b9c7e7599d61..27f70544f1f6 100644
> >> --- a/src/meson.build
> >> +++ b/src/meson.build
> >> @@ -1,7 +1,5 @@
> >>  # SPDX-License-Identifier: CC0-1.0
> >>
> >> -subdir('android')
> >> -
> >>  openssl = find_program('openssl', required : true)
> >>  if openssl.found()
> >>      ipa_priv_key = custom_target('ipa-priv-key',
> >> @@ -13,8 +11,12 @@ else
> >>      ipa_sign_module = false
> >>  endif
> >>
> >> +# The Android HAL must be built before, and is included in libcamera.
> > 
> > well, to be picky, I think it's because of how we add the
> > android_hal_sources and the metadata library definition that we reuse
> > in the src/libcamera/meson.build file when building the library.
> > 
> > It's then mostly about how we instrumented the build system I think
> > 
> > # The 'android' subdir must be listed first, as build targets there
> > # defined are required when building libcamera
> 
> It's a good point. The android layer isn't built during this subdir call
> - it's just processed, and the build targets collected into a variable
> which gets built into the main library I believe.
> 
> How about
> # The 'android' subdir must be processed first, and the build targets
> # are included directly into the libcamera library when this is enabled.

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

I wonder if at some point we'll split it to a separate library.

> > Just an idea
> > 
> > Whatever is fine,really
> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> > 
> > Thanks
> >   j
> > 
> >> +subdir('android')
> >> +
> >>  subdir('libcamera')
> >>  subdir('ipa')
> >> +
> >>  subdir('cam')
> >>  subdir('qcam')
> >>
Kieran Bingham Dec. 1, 2020, 11:20 p.m. UTC | #5
Hi Laurent,

On 01/12/2020 17:14, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Tue, Nov 24, 2020 at 09:10:29PM +0000, Kieran Bingham wrote:
>> On 24/11/2020 20:56, Jacopo Mondi wrote:
>>> On Mon, Nov 23, 2020 at 04:43:13PM +0000, Kieran Bingham wrote:
>>>> Move the android subdir below the configuration options to keep all
>>>> subdirs together.
>>>>
>>>> Add a comment explaining why android must come first, and some padding
>>>> to group the libcamera and ipa components, applications, and remaining
>>>> adaptation layers.
>>>>
>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>>> ---
>>>>  src/meson.build | 6 ++++--
>>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/src/meson.build b/src/meson.build
>>>> index b9c7e7599d61..27f70544f1f6 100644
>>>> --- a/src/meson.build
>>>> +++ b/src/meson.build
>>>> @@ -1,7 +1,5 @@
>>>>  # SPDX-License-Identifier: CC0-1.0
>>>>
>>>> -subdir('android')
>>>> -
>>>>  openssl = find_program('openssl', required : true)
>>>>  if openssl.found()
>>>>      ipa_priv_key = custom_target('ipa-priv-key',
>>>> @@ -13,8 +11,12 @@ else
>>>>      ipa_sign_module = false
>>>>  endif
>>>>
>>>> +# The Android HAL must be built before, and is included in libcamera.
>>>
>>> well, to be picky, I think it's because of how we add the
>>> android_hal_sources and the metadata library definition that we reuse
>>> in the src/libcamera/meson.build file when building the library.
>>>
>>> It's then mostly about how we instrumented the build system I think
>>>
>>> # The 'android' subdir must be listed first, as build targets there
>>> # defined are required when building libcamera
>>
>> It's a good point. The android layer isn't built during this subdir call
>> - it's just processed, and the build targets collected into a variable
>> which gets built into the main library I believe.
>>
>> How about
>> # The 'android' subdir must be processed first, and the build targets
>> # are included directly into the libcamera library when this is enabled.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> I wonder if at some point we'll split it to a separate library.

I think that would be better indeed, and would help with packaging
perhaps too.

But it's not for now ;-)

--
Kieran

>>> Just an idea
>>>
>>> Whatever is fine,really
>>> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
>>>
>>> Thanks
>>>   j
>>>
>>>> +subdir('android')
>>>> +
>>>>  subdir('libcamera')
>>>>  subdir('ipa')
>>>> +
>>>>  subdir('cam')
>>>>  subdir('qcam')
>>>>
>

Patch
diff mbox series

diff --git a/src/meson.build b/src/meson.build
index b9c7e7599d61..27f70544f1f6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,7 +1,5 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
-subdir('android')
-
 openssl = find_program('openssl', required : true)
 if openssl.found()
     ipa_priv_key = custom_target('ipa-priv-key',
@@ -13,8 +11,12 @@  else
     ipa_sign_module = false
 endif
 
+# The Android HAL must be built before, and is included in libcamera.
+subdir('android')
+
 subdir('libcamera')
 subdir('ipa')
+
 subdir('cam')
 subdir('qcam')