Message ID | 20250204160609.1646883-1-pkj@axis.com |
---|---|
State | New |
Headers | show |
Series | meson.bbclass: Specify a cross binary for cmake | expand |
On 4 Feb 2025, at 16:06, Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote:
> +cmake = ‘cmake'
Is that not the default?
Ross
> -----Original Message----- > From: Ross Burton <Ross.Burton@arm.com> > Sent: den 4 februari 2025 17:20 > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com> > Cc: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake > > On 4 Feb 2025, at 16:06, Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote: > > +cmake = ‘cmake' > > Is that not the default? Does not look like it. I guess it is the same as for, e.g., pkg-config, which is on the next line in the meson.cross file. Without it, the build fails with: Found CMake: NO Run-time dependency nlohmann_json_schema_validator found: NO (tried pkgconfig) ../git/meson.build:8:18: ERROR: Dependency "nlohmann_json_schema_validator" not found, tried pkgconfig With it, I instead get: Found CMake: .../recipe-sysroot-native/usr/bin/cmake (3.30.2) Run-time dependency nlohmann_json_schema_validator found: YES 2.2.0 and the build succeeds. > > Ross //Peter
On 4 Feb 2025, at 16:45, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote: > Does not look like it. I guess it is the same as for, e.g., pkg-config, > which is on the next line in the meson.cross file. Just had it confirmed that in cross builds meson needs _every_ binary to be specified, so this patch is entirely correct. Surprised we’d gone so long without the cmake integration to be honest. Ross
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index b343480f9a..bd1b86e931 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -73,6 +73,7 @@ nm = ${@meson_array('NM', d)} strip = ${@meson_array('STRIP', d)} readelf = ${@meson_array('READELF', d)} objcopy = ${@meson_array('OBJCOPY', d)} +cmake = 'cmake' pkg-config = 'pkg-config' llvm-config = 'llvm-config' cups-config = 'cups-config'
This is needed to find dependencies that only provide CMake files, e.g., json-schema-validator in meta-oe. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- meta/classes-recipe/meson.bbclass | 1 + 1 file changed, 1 insertion(+)