[vulkan-sdk-components] Use separate port for the SDK (#35742)

* [vulkan-sdk] Separate port

* Update ci.baseline.txt

* [hikogui] Using glslc from shaderc

* [vulkan] Drop LICENSE.txt

* [vulkan-sdk-components] Avoid vulkan-sdk name

* [vulkan] Fixup copyright text
This commit is contained in:
Kai Pastor 2023-12-29 09:21:45 +01:00 committed by GitHub
parent dc19823670
commit 8397227251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 155 additions and 60 deletions

View File

@ -1,7 +1,7 @@
{
"name": "hikogui",
"version": "0.8.1",
"port-version": 1,
"port-version": 2,
"maintainers": "@takev",
"description": "A portable, low latency, retained-mode GUI framework written in C++.",
"homepage": "https://github.com/hikogui/hikogui",
@ -14,6 +14,7 @@
"tools"
]
},
"shaderc",
{
"name": "vcpkg-cmake",
"host": true

View File

@ -0,0 +1,26 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
set(components COMPONENTS glslang)
if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND components dxc)
endif()
set(vulkan_result_file "${CURRENT_BUILDTREES_DIR}/vulkan-${TARGET_TRIPLET}.cmake.log")
vcpkg_cmake_configure(
SOURCE_PATH "${CURRENT_INSTALLED_DIR}/share/vulkan/detect-vulkan"
OPTIONS
"-DVCPKG_VULKAN_VERSION=${VERSION}"
"-DVCPKG_VULKAN_COMPONENTS=${components}"
OPTIONS_RELEASE
"-DOUTFILE=${vulkan_result_file}"
)
include("${vulkan_result_file}")
if(NOT DETECTED_Vulkan_FOUND)
message(FATAL_ERROR "The Vulkan SDK wasn't found.")
endif()
find_file(vulkan_license NAMES LICENSE.txt PATHS ${DETECTED_Vulkan_INCLUDE_DIRS} "${CURRENT_PORT_DIR}" PATH_SUFFIXES "..")
vcpkg_install_copyright(FILE_LIST "${vulkan_license}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -0,0 +1,12 @@
vulkan-sdk-components is compatible with built-in CMake targets:
# https://cmake.org/cmake/help/latest/module/FindVulkan.html
find_package(Vulkan REQUIRED)
# SPIR-V generator library
target_link_libraries(main PRIVATE Vulkan::glslang)
# DirectX Shader Compiler
target_link_libraries(main PRIVATE Vulkan::dxc)
The vulkan-sdk-components package does not provide direct Visual Studio
integration. For manual integration, add $(VULKAN_SDK)/include to your
include path.

View File

@ -0,0 +1,47 @@
{
"$comment": "Dependencies extracted from e.g. https://sdk.lunarg.com/sdk/download/1.3.268.0/windows/config.json",
"name": "vulkan-sdk-components",
"version": "1.3.268.0",
"description": "Installs packages which are part of the Vulkan SDK.",
"license": null,
"supports": "!uwp & !xbox",
"dependencies": [
{
"name": "directx-dxc",
"platform": "windows"
},
"glm",
"glslang",
"jsoncpp",
{
"name": "mimalloc",
"platform": "windows"
},
"robin-hood-hashing",
"sdl2",
"shaderc",
"spirv-cross",
"spirv-headers",
"valijson",
{
"name": "vcpkg-cmake",
"host": true
},
"volk",
"vulkan",
"vulkan-memory-allocator",
"vulkan-utility-libraries",
"vulkan-validationlayers"
],
"features": {
"tools": {
"description": "Build Vulkan related tools",
"dependencies": [
"lunarg-vulkantools",
"spirv-reflect",
"spirv-tools",
"vulkan-tools"
]
}
}
}

View File

@ -1,10 +1,10 @@
{
"name": "vulkan-utility-libraries",
"version": "1.3.268.0",
"port-version": 1,
"description": "Utility libraries for Vulkan developers",
"homepage": "https://github.com/KhronosGroup/Vulkan-Utility-Libraries",
"license": null,
"supports": "!android",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -2,9 +2,11 @@ cmake_minimum_required(VERSION 3.25)
project(FIND_VULKAN LANGUAGES C)
set(CMAKE_FIND_DEBUG_MODE ON)
find_package(Vulkan ${VCPKG_VULKAN_VERSION})
find_package(Vulkan ${VCPKG_VULKAN_VERSION} ${VCPKG_VULKAN_COMPONENTS})
if(NOT Vulkan_FOUND)
set(CMAKE_FIND_DEBUG_MODE ON)
find_package(Vulkan ${VCPKG_VULKAN_VERSION} ${VCPKG_VULKAN_COMPONENTS})
endif()
set(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}/vulkan-result.cmake" CACHE FILEPATH "")
configure_file("vulkan-result.cmake.in" "${OUTFILE}" @ONLY ESCAPE_QUOTES)

View File

@ -1,31 +1,31 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
set(vulkan_result_file "${CURRENT_BUILDTREES_DIR}/vulkan-${TARGET_TRIPLET}.cmake.log")
vcpkg_cmake_configure(
SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}"
OPTIONS
"-DVCPKG_VULKAN_VERSION=${VERSION}"
OPTIONS_RELEASE
"-DOUTFILE=${vulkan_result_file}"
)
include("${vulkan_result_file}")
if(DETECTED_Vulkan_FOUND)
message(STATUS "Found Vulkan SDK ${DETECTED_Vulkan_VERSION} (${DETECTED_Vulkan_LIBRARIES})")
message(STATUS "Found Vulkan ${DETECTED_Vulkan_VERSION} (${DETECTED_Vulkan_LIBRARIES})")
else()
set(message "The Vulkan SDK wasn't found. ")
if(VCPKG_TARGET_IS_WINDOWS)
string(APPEND message "Refer to Getting Started with the Windows Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html")
elseif(VCPKG_TARGET_IS_OSX)
string(APPEND message "Refer to Getting Started with the MacOS Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html")
elseif(VCPKG_TARGET_IS_LINUX)
string(APPEND message "Refer to Getting Started with the Linux Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html")
set(message "Vulkan wasn't found.")
if(VCPKG_TARGET_IS_ANDROID AND DETECTED_ANDROID_NATIVE_API_LEVEL AND DETECTED_ANDROID_NATIVE_API_LEVEL LESS "24")
string(APPEND message " Vulkan support from the Android NDK requires API level 24 (found: ${DETECTED_ANDROID_NATIVE_API_LEVEL})")
endif()
message(FATAL_ERROR "${message}")
endif()
find_file(vulkan_license NAMES LICENSE.txt PATHS ${DETECTED_Vulkan_INCLUDE_DIRS} "${CURRENT_PORT_DIR}" PATH_SUFFIXES "..")
vcpkg_install_copyright(FILE_LIST "${vulkan_license}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_LIST_DIR}/vulkan-result.cmake.in"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/detect-vulkan"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" [[
This is a stub package. Copyright and license information
is provided with Vulkan headers and loader.
For Android, the loader is provided by the NDK.
]])

View File

@ -3,6 +3,3 @@ vulkan is compatible with built-in CMake targets:
# https://cmake.org/cmake/help/latest/module/FindVulkan.html
find_package(Vulkan REQUIRED)
target_link_libraries(main PRIVATE Vulkan::Vulkan)
The vulkan package does not provide direct Visual Studio integration.
For manual integration, add $(VULKAN_SDK)/include to your include path.

View File

@ -1,48 +1,21 @@
{
"$comment": "Dependencies extracted from e.g. https://sdk.lunarg.com/sdk/download/1.3.268.0/windows/config.json",
"name": "vulkan",
"version": "1.3.268.0",
"description": "A stub package that ensures that the Vulkan SDK is installed.",
"version-date": "2023-12-17",
"description": [
"A stub package that ensures that Vulkan headers and a loader are available.",
"On Android, the NDK provides a loader at API level 24 or higher."
],
"license": null,
"supports": "!uwp & !xbox",
"dependencies": [
{
"name": "directx-dxc",
"platform": "windows"
},
"glm",
"glslang",
"jsoncpp",
{
"name": "mimalloc",
"platform": "windows"
},
"robin-hood-hashing",
"sdl2",
"shaderc",
"spirv-cross",
"spirv-headers",
"valijson",
{
"name": "vcpkg-cmake",
"host": true
},
"volk",
"vulkan-headers",
"vulkan-loader",
"vulkan-memory-allocator",
"vulkan-utility-libraries",
"vulkan-validationlayers"
],
"features": {
"tools": {
"description": "Build Vulkan related tools",
"dependencies": [
"lunarg-vulkantools",
"spirv-reflect",
"spirv-tools",
"vulkan-tools"
{
"name": "vulkan-loader",
"platform": "!android"
}
]
}
}
}

View File

@ -2,3 +2,4 @@ set(DETECTED_Vulkan_FOUND "@Vulkan_FOUND@")
set(DETECTED_Vulkan_VERSION "@Vulkan_VERSION@")
set(DETECTED_Vulkan_INCLUDE_DIRS "@Vulkan_INCLUDE_DIRS@")
set(DETECTED_Vulkan_LIBRARIES "@Vulkan_LIBRARIES@")
set(DETECTED_ANDROID_NATIVE_API_LEVEL "@ANDROID_NATIVE_API_LEVEL@")

View File

@ -1188,6 +1188,14 @@ vowpal-wabbit:x64-android=fail
vtk-m:arm-neon-android=fail
vtk-m:arm64-android=fail
vtk-m:x64-android=fail
# Needs android-24 to supply a vulkan loader library
vulkan:arm-neon-android=fail
vulkan:arm64-android=fail
vulkan:x64-android=fail
# Needs android-26
vulkan-utility-libraries:arm-neon-android=fail
vulkan-utility-libraries:arm64-android=fail
vulkan-utility-libraries:x64-android=fail
# Conflicts with latest openjpeg port (vxl ships with an old version of openjpeg)
# conflicts with qt5-location
vxl:arm-neon-android=skip

View File

@ -3334,7 +3334,7 @@
},
"hikogui": {
"baseline": "0.8.1",
"port-version": 1
"port-version": 2
},
"hiredis": {
"baseline": "1.2.0",
@ -8973,7 +8973,7 @@
"port-version": 2
},
"vulkan": {
"baseline": "1.3.268.0",
"baseline": "2023-12-17",
"port-version": 0
},
"vulkan-headers": {
@ -8996,13 +8996,17 @@
"baseline": "3.0.1.1",
"port-version": 0
},
"vulkan-sdk-components": {
"baseline": "1.3.268.0",
"port-version": 0
},
"vulkan-tools": {
"baseline": "1.3.268.0",
"port-version": 0
},
"vulkan-utility-libraries": {
"baseline": "1.3.268.0",
"port-version": 0
"port-version": 1
},
"vulkan-validationlayers": {
"baseline": "1.3.268.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d007fc919e0734e139f89d285000d2d166315f73",
"version": "0.8.1",
"port-version": 2
},
{
"git-tree": "89a94b29c6cf63fb3e99c979281751279f02031e",
"version": "0.8.1",

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "efe1324e0d30a235687686111be4daa4605083e6",
"version": "1.3.268.0",
"port-version": 0
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d90089cebfde86dcb2c554b9e45271889503fc36",
"version": "1.3.268.0",
"port-version": 1
},
{
"git-tree": "0849291de2e14ef941d30aef9a17e45547329e44",
"version": "1.3.268.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3e8d64ec799440b97c7151f97dd00a53e8e1b5ea",
"version-date": "2023-12-17",
"port-version": 0
},
{
"git-tree": "27c107c7bd16ff68d2c9da45b0020713d4b2ea03",
"version": "1.3.268.0",