[libcamera-devel] [PATCH] meson: reduce required version to 0.53

Christian Rauch Rauch.Christian at gmx.de
Fri Dec 17 02:05:58 CET 2021



Am 17.12.21 um 00:56 schrieb Laurent Pinchart:
> Hi Christian,
>
> On Fri, Dec 17, 2021 at 12:47:19AM +0000, Christian Rauch wrote:
>> Am 17.12.21 um 00:18 schrieb Laurent Pinchart:
>>> On Fri, Dec 17, 2021 at 12:09:41AM +0000, Christian Rauch wrote:
>>>> Hello,
>>>>
>>>> I am attaching a patch to reduce the required meson version from 0.55 to
>>>> 0.53. There are no features in higher meson versions that are required
>>>> to build libcamera and this increases the number of systems that can
>>>> build libcamera with packaged meson versions.
>>>
>>> We use cmake.subproject_options() in src/android/meson.build, which
>>> according to the documentation been introduced in meson 0.55 (see
>>> https://mesonbuild.com/CMake-module.html#configuration-options).
>>
>> The android feature is optional and disabled by default. I think there
>> is no option to have the minimum meson version selected automatically by
>> features (e.g. require 0.55 only if android=enabled).
>
> That's unfortunately correct.
>
>> In the official
>> documentation version 0.55 could still be required for android. But the
>> default version will build fine with 0.53 according to the official
>> build instructions.
>
> meson will then print this warning when building the Android HAL:
>
> WARNING: Project targeting '>= 0.53' but tried to use feature introduced in '0.55.0': subproject_options.
> WARNING: Project targeting '>= 0.53' but tried to use feature introduced in '0.55.0': options arg in subproject.

That's correct, but it will only work if 0.55 is already installed. On
0.53 it will just give an error if "android=enabled":

ERROR: Module cmake does not have method subproject_options.

Would the proposal above (keeping 0.53 for the default configuration and
documenting 0.55 for the android feature) be a viable option? That would
mean a build with android=enabled would show the above error, but it
would build after updating to 0.55.

Best.

>
>>>> From 1f7e62154e1d81c47fba777b3bf2893fec558b63 Mon Sep 17 00:00:00 2001
>>>> From: Christian Rauch <Rauch.Christian at gmx.de>
>>>> Date: Thu, 16 Dec 2021 23:53:31 +0000
>>>> Subject: meson: reduce required version to 0.53
>>>>
>>>> Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
>>>>
>>>> diff --git a/meson.build b/meson.build
>>>> index a20cc29e..3bfd26fe 100644
>>>> --- a/meson.build
>>>> +++ b/meson.build
>>>> @@ -1,7 +1,7 @@
>>>>  # SPDX-License-Identifier: CC0-1.0
>>>>
>>>>  project('libcamera', 'c', 'cpp',
>>>> -    meson_version : '>= 0.55',
>>>> +    meson_version : '>= 0.53',
>>>>      version : '0.0.0',
>>>>      default_options : [
>>>>          'werror=true',
>


More information about the libcamera-devel mailing list