vcpkg/ports/shaderc/cmake-project-include.cmake
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

17 lines
774 B
CMake

set(SHADERC_GLSLANG_DIR "" CACHE STRING "unused")
find_package(glslang CONFIG REQUIRED)
add_library(glslang ALIAS glslang::glslang)
add_library(HLSL ALIAS glslang::HLSL)
add_library(MachineIndependent ALIAS glslang::MachineIndependent)
add_library(OSDependent ALIAS glslang::OSDependent)
add_library(OGLCompiler ALIAS glslang::OGLCompiler)
add_library(SPIRV ALIAS glslang::SPIRV)
find_path(glslang_SOURCE_DIR glslang/Public/ShaderLang.h REQUIRED)
set(glslang_SOURCE_DIR "${glslang_SOURCE_DIR}/glslang" "${glslang_SOURCE_DIR}" CACHE STRING "" FORCE)
set(SHADERC_SPIRV_TOOLS_DIR "" CACHE STRING "unused")
find_package(SPIRV-Tools CONFIG REQUIRED)
add_library(SPIRV-Tools ALIAS SPIRV-Tools-static) # as linked by SPIRV-Tools-opt
find_package(SPIRV-Tools-opt CONFIG REQUIRED)