vcpkg/ports/spirv-tools/fix-tool-deps.diff
Kai Pastor 4cca179bd7
[shaderc, spirv-tools] Fix cmake config, add usage, minor fixes (#31912)
* [spirv-tools] Lower-case dirs for cmake config

* Simplify CMake config fixup

* Add usage

* Update versions

* [shaderc] Minor fixes

* Fix package imports in build and exported config

* Add usage - shaderc_util is a private lib

The port never installed this lib's headers.

* Fix pc file installation

* Update versions

* [spirv-tools] Add tools feature

* [spirv-tools] Fix exported cmake config

* [shaderc] Fis SPIRV-Tools target

* Fix tools feature
2023-06-13 20:48:27 -07:00

19 lines
676 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cf1e40..5f2a86c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,8 +280,13 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
endif()
macro(spvtools_generate_config_file TARGET)
+ set(sgcf_find_extra "")
+ if(NOT "${TARGET}" STREQUAL "SPIRV-Tools-opt")
+ set(sgcf_find_extra "find_dependency(SPIRV-Tools-opt)\n")
+ endif()
file(WRITE ${CMAKE_BINARY_DIR}/${TARGET}Config.cmake
"include(CMakeFindDependencyMacro)\n"
+ ${sgcf_find_extra}
"find_dependency(${SPIRV_TOOLS})\n"
"include(\${CMAKE_CURRENT_LIST_DIR}/${TARGET}Targets.cmake)\n"
"set(${TARGET}_LIBRARIES ${TARGET})\n"