On Mon, Sep 6, 2021 at 5:51 AM Purushottam Choudhary <[email protected]> wrote: > > Fix path for _IMPORT_CHECK_FILES_FOR_assimp > As it is giving configuration error during validation of path > when used by 3rd party component to configure itself > using assimp::assimp target. > Compute the installation prefix relative to file. > > Signed-off-by: Purushottam Choudhary <[email protected]> > --- > ...h-for-_IMPORT_CHECK_FILES_FOR_assimp.patch | 93 +++++++++++++++++++ > ...hared-lib-from-_IMPORT_CHECK_TARGETS.patch | 32 ------- > meta/recipes-graphics/vulkan/assimp_5.0.1.bb | 2 +- > 3 files changed, 94 insertions(+), 33 deletions(-) > create mode 100644 > meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch > delete mode 100644 > meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch > > diff --git > a/meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch > > b/meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch > new file mode 100644 > index 0000000000..11f1da6f3b > --- /dev/null > +++ > b/meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch > @@ -0,0 +1,93 @@ > +From 330914fed75cde09f48553cae92bed89925d98d8 Mon Sep 17 00:00:00 2001 > +From: Purushottam Choudhary <[email protected]> > +Date: Mon, 6 Sep 2021 16:30:38 +0530 > +Subject: [PATCH] Fix path for _IMPORT_CHECK_FILES_FOR_assimp > + > +Fix path for _IMPORT_CHECK_FILES_FOR_assimp > +As it is giving configuration error during validation of path > +when used by 3rd party component to configure itself > +using assimp::assimp target. > +Compute the installation prefix relative to file. > + > +Upstream-Status: Inappropriate [oe specific]
Please submit this patch to upstream assimp as well, its not a small change to maintain over time. perhaps upstream can suggest a solution that can be applied upstream as well if not this one. > + > +Signed-off-by: Ranjitsinh Rathod <[email protected]> > +Signed-off-by: Purushottam Choudhary <[email protected]> > +--- > + assimpTargets-release.cmake.in | 10 +++++----- > + assimpTargets.cmake.in | 12 ++++++++++++ > + 2 files changed, 17 insertions(+), 5 deletions(-) > + > +diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in > +index a416e8899..cd91e1277 100644 > +--- a/assimpTargets-release.cmake.in > ++++ b/assimpTargets-release.cmake.in > +@@ -46,8 +46,8 @@ if(MSVC) > + IMPORTED_LOCATION_RELEASE > "@CMAKE_INSTALL_FULL_BINDIR@/${sharedLibraryName}" > + ) > + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) > +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_LIBDIR@/${importLibraryName}") > +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_BINDIR@/${sharedLibraryName}" ) > ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "${_IMPORT_PREFIX}/lib/${importLibraryName}") > ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "${_IMPORT_PREFIX}/bin/${sharedLibraryName}") > + else() > + set(staticLibraryName > "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") > + > +@@ -57,7 +57,7 @@ if(MSVC) > + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}" > + ) > + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) > +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_LIBDIR@/${staticLibraryName}") > ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "${_IMPORT_PREFIX}/lib/${staticLibraryName}") > + endif() > + > + else() > +@@ -73,14 +73,14 @@ else() > + IMPORTED_LOCATION_RELEASE > "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" > + ) > + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) > +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" ) > ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" ) > + else() > + set(staticLibraryName > "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") > + set_target_properties(assimp::assimp PROPERTIES > + IMPORTED_LOCATION_RELEASE > "@CMAKE_INSTALL_FULL_LIBDIR@/${staticLibraryName}" > + ) > + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) > +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_LIBDIR@/${staticLibraryName}" ) > ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "${_IMPORT_PREFIX}/lib/${staticLibraryName}" ) > + endif() > + endif() > + > +diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in > +index ef90c834a..140386660 100644 > +--- a/assimpTargets.cmake.in > ++++ b/assimpTargets.cmake.in > +@@ -40,6 +40,15 @@ unset(_targetsDefined) > + unset(_targetsNotDefined) > + unset(_expectedTargets) > + > ++# Compute the installation prefix relative to this file. > ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) > ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) > ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) > ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) > ++if(_IMPORT_PREFIX STREQUAL "/") > ++ set(_IMPORT_PREFIX "") > ++endif() > ++ > + # Create imported target assimp::assimp > + if(@BUILD_SHARED_LIBS@) > + add_library(assimp::assimp SHARED IMPORTED) > +@@ -65,6 +74,9 @@ foreach(f ${CONFIG_FILES}) > + include(${f}) > + endforeach() > + > ++# Cleanup temporary variables. > ++set(_IMPORT_PREFIX) > ++ > + # Loop over all imported files and verify that they actually exist > + foreach(target ${_IMPORT_CHECK_TARGETS} ) > + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) > +-- > +2.17.1 > diff --git > a/meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch > > b/meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch > deleted file mode 100644 > index 1078148d6b..0000000000 > --- > a/meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch > +++ /dev/null > @@ -1,32 +0,0 @@ > -From: Ranjitsinh Rathod <[email protected]> > -Date: Fri, 13 Aug 2021 16:42:48 +0530 > -Subject: [PATCH] assimp: remove shared lib from _IMPORT_CHECK_TARGETS > - > -In the target assimp::assimp shared library verification removed > -as it is giving configuration error when used by 3rd part component to > -configure itself using assimp::assimp target > - > -Upstream-Status: Inappropriate [oe specific] > - > -Signed-off-by: Ranjitsinh Rathod <[email protected]> > ---- > - assimpTargets-release.cmake.in | 4 ++-- > - 1 file changed, 2 insertions(+), 2 deletions(-) > - > -diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in > -index cd2fac7e0..52edc7990 100644 > ---- a/assimpTargets-release.cmake.in > -+++ b/assimpTargets-release.cmake.in > -@@ -72,8 +72,8 @@ else() > - IMPORTED_SONAME_RELEASE "${sharedLibraryName}" > - IMPORTED_LOCATION_RELEASE > "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" > - ) > -- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) > -- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" ) > -+ #list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) > -+ #list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp > "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" ) > - else() > - set(staticLibraryName > "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") > - set_target_properties(assimp::assimp PROPERTIES > --- > -2.17.1 > diff --git a/meta/recipes-graphics/vulkan/assimp_5.0.1.bb > b/meta/recipes-graphics/vulkan/assimp_5.0.1.bb > index 89c555f08e..3a1f850f64 100644 > --- a/meta/recipes-graphics/vulkan/assimp_5.0.1.bb > +++ b/meta/recipes-graphics/vulkan/assimp_5.0.1.bb > @@ -11,7 +11,7 @@ DEPENDS = "zlib" > SRC_URI = "git://github.com/assimp/assimp.git;branch=assimp_5.0_release \ > > file://0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch \ > file://use-GNUInstallDirs-where-possible.patch \ > - > file://0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch \ > + file://0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch \ > " > UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))" > > -- > 2.17.1 > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#155725): https://lists.openembedded.org/g/openembedded-core/message/155725 Mute This Topic: https://lists.openembedded.org/mt/85411291/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
