Skip to content
Commit 2f959497 authored by Vincent Davis Jr's avatar Vincent Davis Jr Committed by Richard Purdie
Browse files

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}".

Signed-off-by: default avatarVincent Davis Jr <vince@underview.tech>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent 260bd5c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment