mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-12 17:30:15 +00:00
Add exported CMake config file for binaries in ./tools/ (#5034)
The package is called SPIRV-Tools-tools, which might be a bit confusing, but at lease follows the general naming scheme.
This commit is contained in:
parent
bbdd0fefda
commit
077b09c32a
@ -69,6 +69,22 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})
|
||||
endif(SPIRV_BUILD_FUZZER)
|
||||
|
||||
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
install(TARGETS ${SPIRV_INSTALL_TARGETS} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(TARGETS ${SPIRV_INSTALL_TARGETS} EXPORT SPIRV-Tools-toolsTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
export(EXPORT SPIRV-Tools-toolsTargets FILE SPIRV-Tools-toolsTargets.cmake)
|
||||
|
||||
spvtools_config_package_dir(SPIRV-Tools-tools PACKAGE_DIR)
|
||||
install(EXPORT SPIRV-Tools-toolsTargets FILE SPIRV-Tools-toolsTargets.cmake
|
||||
DESTINATION ${PACKAGE_DIR})
|
||||
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/SPIRV-Tools-toolsConfig.cmake
|
||||
"include(CMakeFindDependencyMacro)\n"
|
||||
"find_dependency(${SPIRV_TOOLS})\n"
|
||||
"include(\${CMAKE_CURRENT_LIST_DIR}/SPIRV-Tools-toolsTargets.cmake)\n"
|
||||
)
|
||||
|
||||
install(FILES ${CMAKE_BINARY_DIR}/SPIRV-Tools-toolsConfig.cmake DESTINATION ${PACKAGE_DIR})
|
||||
endif(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user