[spirv-reflect] Don't vendor spirv headers (#28749)

* [spirv-reflect] Add spirv-headers dependency

* [spirv-reflect] Run vcpkg x-add-version spirv-reflect
This commit is contained in:
Attractadore 2023-01-09 21:10:03 +03:00 committed by GitHub
parent f14984af37
commit b2b5d1bf9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 10 deletions

View File

@ -3,31 +3,43 @@ project(spirv-reflect)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
find_package(SPIRV-Headers REQUIRED)
add_library(spirv-reflect ${CMAKE_CURRENT_SOURCE_DIR}/spirv_reflect.h
${CMAKE_CURRENT_SOURCE_DIR}/spirv_reflect.c)
if (SPIRV_REFLECT_ENABLE_ASSERTS)
target_compile_definitions(spirv-reflect PRIVATE SPIRV_REFLECT_ENABLE_ASSERTS)
endif()
set_target_properties(spirv-reflect PROPERTIES CXX_STANDARD 11)
target_include_directories(spirv-reflect PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if(WIN32)
target_compile_definitions(spirv-reflect PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
target_link_libraries(spirv-reflect PUBLIC SPIRV-Headers::SPIRV-Headers)
target_compile_definitions(spirv-reflect PUBLIC SPIRV_REFLECT_USE_SYSTEM_SPIRV_H)
target_include_directories(spirv-reflect INTERFACE $<INSTALL_INTERFACE:include>)
set(config_file ${CMAKE_CURRENT_BINARY_DIR}/unofficial-spirv-reflect-config.cmake)
set(targets unofficial-spirv-reflect-targets)
file(WRITE ${config_file}
"include(CMakeFindDependencyMacro)
find_dependency(SPIRV-Headers)
include(\${CMAKE_CURRENT_LIST_DIR}/${targets}.cmake)")
install(FILES ${config_file} DESTINATION share/unofficial-spirv-reflect)
install(
TARGETS spirv-reflect EXPORT unofficial-spirv-reflect-config
TARGETS spirv-reflect EXPORT ${targets}
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(
EXPORT unofficial-spirv-reflect-config
EXPORT ${targets}
NAMESPACE unofficial::spirv-reflect::
DESTINATION share/unofficial-spirv-reflect
)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/spirv_reflect.h" DESTINATION include)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include" DESTINATION include)

View File

@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/SPIRV-Reflect
REF sdk-1.3.204.1
SHA512 af0bfcb7a8565cbd981034900760d304792e9dfb0a166b712e3506475fdeff282e0ba0f02d82d671ee05e7ed0792815eba654b66af0739404bf38c9e12ebf4f5
REF sdk-1.3.236.0
SHA512 8ee0b88e46feac0ece478c6584e0ceb96b2ac976c2d1dc5813e0e26b20de8fa0264499cc9eea973bb3dd9a6877a421d00557f0fef7e323926df1db314373ea90
HEAD_REF master
)

View File

@ -1,11 +1,11 @@
{
"name": "spirv-reflect",
"version": "1.3.204.1",
"port-version": 1,
"version": "1.3.236.0",
"description": "SPIRV-Reflect is a lightweight library that provides a C/C++ reflection API for SPIR-V shader bytecode in Vulkan applications.",
"homepage": "https://github.com/KhronosGroup/SPIRV-Reflect",
"license": "Apache-2.0",
"dependencies": [
"spirv-headers",
{
"name": "vcpkg-cmake",
"host": true

View File

@ -7253,8 +7253,8 @@
"port-version": 1
},
"spirv-reflect": {
"baseline": "1.3.204.1",
"port-version": 1
"baseline": "1.3.236.0",
"port-version": 0
},
"spirv-tools": {
"baseline": "2022.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e36ea589e8b33e978c90da2c33ee457cd948dfce",
"version": "1.3.236.0",
"port-version": 0
},
{
"git-tree": "c91c6adcaec9c0be70159ab302a5999574400e58",
"version": "1.3.204.1",