All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Purushottam Choudhary" <purushottamchoudhary29@gmail.com>
To: openembedded-core@lists.openembedded.org, anuj.mittal@intel.com
Cc: Mikko.Rapeli@bmw.de, nisha.parrakat@kpit.com
Subject: [poky][master][PATCH] assimp: Fix path for _IMPORT_CHECK_FILES_FOR_assimp
Date: Mon,  6 Sep 2021 18:21:27 +0530	[thread overview]
Message-ID: <20210906125127.6603-1-purushottamchoudhary29@gmail.com> (raw)

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 <purushottamchoudhary29@gmail.com>
---
 ...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 <purushottamchoudhary29@gmail.com>
+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]
+
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+Signed-off-by: Purushottam Choudhary <purushottam.choudhary@kpit.com>
+---
+ 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 <ranjitsinh.rathod@kpit.com>
-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 <ranjitsinh.rathod@kpit.com>
----
- 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


             reply	other threads:[~2021-09-06 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 12:51 Purushottam Choudhary [this message]
2021-09-06 20:06 ` [OE-core] [poky][master][PATCH] assimp: Fix path for _IMPORT_CHECK_FILES_FOR_assimp Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906125127.6603-1-purushottamchoudhary29@gmail.com \
    --to=purushottamchoudhary29@gmail.com \
    --cc=Mikko.Rapeli@bmw.de \
    --cc=anuj.mittal@intel.com \
    --cc=nisha.parrakat@kpit.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.