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 <skandigr...@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"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#115218): https://lists.openembedded.org/g/openembedded-devel/message/115218 Mute This Topic: https://lists.openembedded.org/mt/110957120/21656 Group Owner: openembedded-devel+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-