All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] capnproto: remove binary checking from target cmake file
@ 2025-02-02 19:06 Gyorgy Sarvari
  2025-02-02 20:33 ` [oe] " Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Gyorgy Sarvari @ 2025-02-02 19:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Gyorgy Sarvari

When linking to capnproto from another project, cmake fails to
find this package with the following error:

| CMake Error at ${RECIPE_SYSROOT}/usr/lib/cmake/CapnProto/CapnProtoTargets.cmake:176 (message):
|   The imported target "CapnProto::capnp_tool" references the file
|
|      "${RECIPE_SYSROOT}/usr/bin/capnp"
|
|   but this file does not exist.  Possible reasons include:

This generates some binary files in ${bindir}, and when crosscompiling,
these files are not included in ${RECIPE_SYSROOT} of the project that
references this ones.

However the cmake file does check if these binaries exist, ultimately
failing the do_configure task due to not finding them. Since these
binaries are not usable on the build system anyway, just remove the
checking of them when compiling for class-target.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb b/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb
index daeeb975f..ad4e036a4 100644
--- a/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb
+++ b/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb
@@ -27,4 +27,10 @@ FILES:${PN}-compiler = "${bindir}"
 PACKAGE_BEFORE_PN = "${PN}-compiler"
 RDEPENDS:${PN}-dev += "${PN}-compiler"
 
+do_install:append:class-target() {
+  # delete lines checking files in bindir, e.g. this:
+  # list(APPEND _cmake_import_check_files_for_CapnProto::capnp_tool "${_IMPORT_PREFIX}/bin/capnp" )
+  sed -i "/.*_cmake_import_check_files_for_CapnProto.*bin\/.*/d" ${D}${libdir}/cmake/CapnProto/CapnProtoTargets-noconfig.cmake
+}
+
 BBCLASSEXTEND = "native nativesdk"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-03  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-02 19:06 [meta-oe][PATCH] capnproto: remove binary checking from target cmake file Gyorgy Sarvari
2025-02-02 20:33 ` [oe] " Ross Burton
2025-02-03  7:48   ` Gyorgy Sarvari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.