[libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so pkg-config file generation

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Jun 25 10:59:26 CEST 2021


Hi Paul, Hiro,

On 25/06/2021 04:11, paul.elder at ideasonboard.com wrote:
> Hi Hiro,
> 
> On Fri, Jun 25, 2021 at 12:06:40PM +0900, Hirokazu Honda wrote:
>> Hi Kieran, thank you for the patch.
>>
>> On Fri, Jun 25, 2021 at 11:30 AM <paul.elder at ideasonboard.com> wrote:
>>>
>>> Hi Kieran,
>>>
>>> On Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:
>>>> The pkg-config file for the main libcamera.so is generated
>>>> at the top level meson.build.
>>>>
>>>> Move this to the actual core libcamera build structure to be
>>>> consistent and keep it next to the library construction.
>>>>
>>>> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>>>
>>> Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
>>>
>>>> ---
>>>>  meson.build               | 8 --------
>>>>  src/libcamera/meson.build | 8 ++++++++
>>>>  2 files changed, 8 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/meson.build b/meson.build
>>>> index 4d7d936f09e2..6eed0d8c4a44 100644
>>>> --- a/meson.build
>>>> +++ b/meson.build
>>>> @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')
>>>>
>>>>  configure_file(output : 'config.h', configuration : config_h)
>>>>
>>>> -pkg_mod = import('pkgconfig')
>>>> -pkg_mod.generate(libraries : libcamera,
>>>> -                 version : '1.0',
>>>> -                 name : 'libcamera',
>>>> -                 filebase : 'camera',
>>>> -                 description : 'Complex Camera Support Library',
>>>> -                 subdirs : 'libcamera')
>>>> -
>>>>  # Check for python installation and modules.
>>>>  py_mod = import('python')
>>>>  py_mod.find_installation('python3', modules: py_modules)
>>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
>>>> index d9b5bfae69fd..e4c60e736697 100644
>>>> --- a/src/libcamera/meson.build
>>>> +++ b/src/libcamera/meson.build
>>>> @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [
>>>>                                     include_directories : libcamera_includes,
>>>>                                     link_with : libcamera)
>>>>
>>>> +pkg_mod = import('pkgconfig')
>>>> +pkg_mod.generate(libraries: libcamera,
>>>> +                 version : '1.0',
>>>> +                 name : 'libcamera',
>>>> +                 filebase : 'camera',
>>
>> This is not related to this change, but why is filebase camera, not libcamera?

As we fix in the next patch, we have historically been creating a
pkg-config file called 'camera.pc' instead of 'libcamera.pc', which is
what the filebase gives us.

This is because when creating this we believed the 'correct' naming for
libcamera artefacts was to drop the 'lib' from the name. (I.e. for
example gstreamer packages are called 'gstreamer-1.0.pc' and not
'libgstreamer.pc').

However, (and I may even have been the cause of that decision, I can't
remember any more) - I don't believe this is the right thing to do at
all now. 'libcamera' is the name of our package, and project. The 'lib'
is integral, so it's brought back in the next patch.


> My understanding is that this patch is for moving this section directly
> without modification, while the next patch changes the filebase from
> camera to libcamera.

Correct ;-)

> Paul
> 
>>
>> Reviewed-by: Hirokazu Honda <hiroh at chromium.org>

Thanks all!


>>
>>>> +                 description : 'Complex Camera Support Library',
>>>> +                 subdirs : 'libcamera')
>>>> +
>>>>  subdir('proxy/worker')
>>>> --
>>>> 2.30.2
>>>>


More information about the libcamera-devel mailing list