The cmake files generated by this recipe contain a number
of interfacing libraries, with absolute paths, which also
contain the TMPDIR. The TMPDIR part of these paths were
just truncated by the recipe, to avoid the corresponding
QA check error.

However this made it impossible to to link against this
library from other recipes. When one tried, the find_package
command failed with the following error:

| Run Build Command(s): ninja -v -j 12 all
| ninja: error: '/usr/lib/libjsoncpp.so', needed by 'jsonrpctest', missing and 
no known rule to make it

To avoid this, instead of just truncating this path, set it to
${CMAKE_SYSROOT} placeholder (which is resolved by CMake to
the correct value at build-time, using the variable set by
cmake.bbclass)

Signed-off-by: Gyorgy Sarvari <skandigr...@gmail.com>
---
 meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb 
b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb
index f0c60e5a86..75f2a53b10 100644
--- a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb
+++ b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb
@@ -26,7 +26,7 @@ EXTRA_OECMAKE += "-DCOMPILE_TESTS=NO -DCOMPILE_STUBGEN=NO 
-DCOMPILE_EXAMPLES=NO
 "
 
 do_install:append() {
-       sed -i -e 's#${RECIPE_SYSROOT}##g' 
${D}${libdir}/libjson-rpc-cpp/cmake/libjson-rpc-cppTargets.cmake
+       sed -i -e 's#${RECIPE_SYSROOT}#\${CMAKE_SYSROOT}#g' 
${D}${libdir}/libjson-rpc-cpp/cmake/libjson-rpc-cppTargets.cmake
 }
 
 FILES:${PN}-dev += "${libdir}/libjson-rpc-cpp/cmake"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115470): 
https://lists.openembedded.org/g/openembedded-devel/message/115470
Mute This Topic: https://lists.openembedded.org/mt/111170787/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to