summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Davis Jr <vince@underview.tech>2023-06-06 10:13:35 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-09 13:55:20 +0100
commit9f1711e8fd6a74c8614390a16fc29df953ab753e (patch)
tree18516a33a8ffa8e026217ca41d817f0aea5becb4
parent10087741166b408c8c19a6e8c3c13439ba0be947 (diff)
downloadpoky-9f1711e8fd6a74c8614390a16fc29df953ab753e.tar.gz
spirv-tools: fix INTERFACE_LINK_LIBRARIES cmake prop
The output of spirv-tools specifically SPIRV-ToolsTarget.cmake is utilized in other recipes. If other recipe utilize cmake and include SPIRV-Tools in target_link_libraries. I leads to errors such as error: '../recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it This is due to cmake pulling in the properties set in SPIRV-ToolsTarget.cmake. Key property being INTERFACE_LINK_LIBRARIES. With the current setup do_install:append:class-target updates SPIRV-ToolsTarget.cmake package installed file to bellow set_target_properties(SPIRV-Tools PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" INTERFACE_LINK_LIBRARIES "${_IMPORT_PREFIX}/lib" ) set_target_properties(SPIRV-Tools-shared PROPERTIES INTERFACE_COMPILE_DEFINITIONS "SPIRV_TOOLS_SHAREDLIB" INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" INTERFACE_LINK_LIBRARIES "${_IMPORT_PREFIX}/lib" ) If base_libdir isn't lib, but lib64 you get the error described at the being of commit message as lib directory doesn't exists. Solution replace hardcoded "lib" with "${base_libdir}". (From OE-Core rev: 2f959497efbba89a34ac1e15ceff32ab75e16c4a) Signed-off-by: Vincent Davis Jr <vince@underview.tech> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb b/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb
index c57acc5a11..21f9dd9650 100644
--- a/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb
+++ b/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb
@@ -32,7 +32,7 @@ do_install:append:class-target() {
32 # Properly set _IMPORT_PREFIX in INTERFACE_LINK_LIBRARIES so that dependent 32 # Properly set _IMPORT_PREFIX in INTERFACE_LINK_LIBRARIES so that dependent
33 # tools can find the right library 33 # tools can find the right library
34 sed -i ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake \ 34 sed -i ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake \
35 -e 's:INTERFACE_LINK_LIBRARIES.*$:INTERFACE_LINK_LIBRARIES "\$\{_IMPORT_PREFIX\}/lib":' 35 -e 's:INTERFACE_LINK_LIBRARIES.*$:INTERFACE_LINK_LIBRARIES "\$\{_IMPORT_PREFIX\}\${base_libdir}":'
36} 36}
37 37
38# all the libraries are unversioned, so don't pack it on PN-dev 38# all the libraries are unversioned, so don't pack it on PN-dev