mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[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:
parent
4f0a640e4c
commit
7003b953c7
33
ports/spirv-reflect/CMakeLists.txt
Normal file
33
ports/spirv-reflect/CMakeLists.txt
Normal 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)
|
22
ports/spirv-reflect/portfile.cmake
Normal file
22
ports/spirv-reflect/portfile.cmake
Normal 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)
|
17
ports/spirv-reflect/vcpkg.json
Normal file
17
ports/spirv-reflect/vcpkg.json
Normal 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"
|
||||
]
|
||||
}
|
@ -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
|
||||
|
9
versions/s-/spirv-reflect.json
Normal file
9
versions/s-/spirv-reflect.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "bcebcfdd9e9332b68c4185b3127fc898fc91402a",
|
||||
"version-date": "2021-12-31",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user