mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-24 16:51:06 +00:00
In generated cmake config file for SPIRV-Tools only access cmake target, if present (#4590)
Fixes #4582
This commit is contained in:
parent
e3a373f2b7
commit
e3c7098104
@ -428,8 +428,10 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
# Special config file for root library compared to other libs.
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake
|
||||
"include(\${CMAKE_CURRENT_LIST_DIR}/${SPIRV_TOOLS}Target.cmake)\n"
|
||||
"set(${SPIRV_TOOLS}_LIBRARIES ${SPIRV_TOOLS})\n"
|
||||
"get_target_property(${SPIRV_TOOLS}_INCLUDE_DIRS ${SPIRV_TOOLS} INTERFACE_INCLUDE_DIRECTORIES)\n")
|
||||
"if(TARGET ${SPIRV_TOOLS})\n"
|
||||
" set(${SPIRV_TOOLS}_LIBRARIES ${SPIRV_TOOLS})\n"
|
||||
" get_target_property(${SPIRV_TOOLS}_INCLUDE_DIRS ${SPIRV_TOOLS} INTERFACE_INCLUDE_DIRECTORIES)\n"
|
||||
"endif()\n")
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake DESTINATION ${PACKAGE_DIR})
|
||||
endif(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user