[Spirv reflect] Add new port (#22295)

* port for spirv-reflect

* commiting results of vcpkg x-add-version --all

* fixing deprecated function calls

* removing unused messages

* fixing version issue

* fixing version issue wrong sha

* fixing version issue missing port version

* fixing version issue missing port version and wrong sha

* update version db

* update version db

* port version bump

* Update version database

* Apply suggestions from code review

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* Update versions db

* CMakeLists substitution instead of patch

* remove commented outdated command

* version update

* Update ports/spirv-reflect/CMakeLists.txt

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* update version db

* Remove GNUInstallDirs

* update version db

* Update ports/spirv-reflect/CMakeLists.txt

Co-authored-by: Billy O'Neal <bion@microsoft.com>

* Adding @BillyONeal suggestions

* Removing unneeded check 

as suggested by @BillyONeal

* Apply suggestions from code review

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* update version db

* Drop "unofficial" from the unnamespaced target name.

* Fix version database.

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
Jan Kleszczyński 2022-02-11 02:12:38 +01:00 committed by GitHub
parent 4f0a640e4c
commit 7003b953c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.1)
project(spirv-reflect)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
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_include_directories(spirv-reflect INTERFACE $<INSTALL_INTERFACE:include>)
install(
TARGETS spirv-reflect EXPORT unofficial-spirv-reflect-config
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(
EXPORT unofficial-spirv-reflect-config
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

@ -0,0 +1,22 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/SPIRV-Reflect
REF d920b79aadafe3ffd52764ac80370b15a611c83a
SHA512 3e94adb9ec80f356bd51665f10e3e1d8e6236632d259a22fab97a156c6cf6fcbd1afc102ac4578fa3f3725b6cc0cbdf530c85fa133154d6c4e313324c1d6bbf4
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/spirv-reflect" RENAME copyright)

View File

@ -0,0 +1,17 @@
{
"name": "spirv-reflect",
"version-date": "2021-12-31",
"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",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"vulkan"
]
}

View File

@ -6584,6 +6584,10 @@
"baseline": "2021-03-25",
"port-version": 0
},
"spirv-reflect": {
"baseline": "2021-12-31",
"port-version": 0
},
"spirv-tools": {
"baseline": "2021.1",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "bcebcfdd9e9332b68c4185b3127fc898fc91402a",
"version-date": "2021-12-31",
"port-version": 0
}
]
}