From 74f0ce702870b95cff0686873c7f5eed6bcd015c Mon Sep 17 00:00:00 2001 From: Adam Johnston Date: Fri, 16 Dec 2022 17:55:08 +0000 Subject: [PATCH] arm/trusted-services: Fix 'no such file' when building libts The libts recipe assumes generated cmake file will be suffixed with '-noconfig'. This is only true when building with the default type i.e. "". Check which target cmake file has been generated before trying to patch it. This fixes 'no such file' error when building with an explicit type (Debug, Release, etc). Signed-off-by: Adam Johnston Signed-off-by: Jon Mason --- meta-arm/recipes-security/trusted-services/libts_git.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta-arm/recipes-security/trusted-services/libts_git.bb b/meta-arm/recipes-security/trusted-services/libts_git.bb index 598b281b..aafe8516 100644 --- a/meta-arm/recipes-security/trusted-services/libts_git.bb +++ b/meta-arm/recipes-security/trusted-services/libts_git.bb @@ -24,11 +24,14 @@ do_install:append () { fi # Move the dynamic libraries into the standard place. - # Update a cmake file to use correct paths. install -d ${D}${libdir} mv ${D}${TS_INSTALL}/lib/libts* ${D}${libdir} - sed -i -e "s#/${TS_ENV}##g" ${D}${TS_INSTALL}/lib/cmake/libts/libtsTargets-noconfig.cmake + # Update generated cmake file to use correct paths. + target_cmake=$(find ${D}${TS_INSTALL}/lib/cmake/libts -type f -iname "libtsTargets-*.cmake") + if [ ! -z "$target_cmake" ]; then + sed -i -e "s#/${TS_ENV}##g" $target_cmake + fi } inherit ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', '', 'useradd', d)}