[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", "name": "hikogui",
"version": "0.8.1", "version": "0.8.1",
"port-version": 1, "port-version": 2,
"maintainers": "@takev", "maintainers": "@takev",
"description": "A portable, low latency, retained-mode GUI framework written in C++.", "description": "A portable, low latency, retained-mode GUI framework written in C++.",
"homepage": "https://github.com/hikogui/hikogui", "homepage": "https://github.com/hikogui/hikogui",
@ -14,6 +14,7 @@
"tools" "tools"
] ]
}, },
"shaderc",
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",
"host": true "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", "name": "vulkan-utility-libraries",
"version": "1.3.268.0", "version": "1.3.268.0",
"port-version": 1,
"description": "Utility libraries for Vulkan developers", "description": "Utility libraries for Vulkan developers",
"homepage": "https://github.com/KhronosGroup/Vulkan-Utility-Libraries", "homepage": "https://github.com/KhronosGroup/Vulkan-Utility-Libraries",
"license": null, "license": null,
"supports": "!android",
"dependencies": [ "dependencies": [
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",

View File

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

View File

@ -1,31 +1,31 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
set(vulkan_result_file "${CURRENT_BUILDTREES_DIR}/vulkan-${TARGET_TRIPLET}.cmake.log") set(vulkan_result_file "${CURRENT_BUILDTREES_DIR}/vulkan-${TARGET_TRIPLET}.cmake.log")
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}" SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}"
OPTIONS
"-DVCPKG_VULKAN_VERSION=${VERSION}"
OPTIONS_RELEASE OPTIONS_RELEASE
"-DOUTFILE=${vulkan_result_file}" "-DOUTFILE=${vulkan_result_file}"
) )
include("${vulkan_result_file}") include("${vulkan_result_file}")
if(DETECTED_Vulkan_FOUND) 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() else()
set(message "The Vulkan SDK wasn't found. ") set(message "Vulkan wasn't found.")
if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_IS_ANDROID AND DETECTED_ANDROID_NATIVE_API_LEVEL AND DETECTED_ANDROID_NATIVE_API_LEVEL LESS "24")
string(APPEND message "Refer to Getting Started with the Windows Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html") string(APPEND message " Vulkan support from the Android NDK requires API level 24 (found: ${DETECTED_ANDROID_NATIVE_API_LEVEL})")
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")
endif() endif()
message(FATAL_ERROR "${message}") message(FATAL_ERROR "${message}")
endif() endif()
find_file(vulkan_license NAMES LICENSE.txt PATHS ${DETECTED_Vulkan_INCLUDE_DIRS} "${CURRENT_PORT_DIR}" PATH_SUFFIXES "..") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
vcpkg_install_copyright(FILE_LIST "${vulkan_license}") "${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(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 # https://cmake.org/cmake/help/latest/module/FindVulkan.html
find_package(Vulkan REQUIRED) find_package(Vulkan REQUIRED)
target_link_libraries(main PRIVATE Vulkan::Vulkan) 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", "name": "vulkan",
"version": "1.3.268.0", "version-date": "2023-12-17",
"description": "A stub package that ensures that the Vulkan SDK is installed.", "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, "license": null,
"supports": "!uwp & !xbox", "supports": "!uwp & !xbox",
"dependencies": [ "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", "name": "vcpkg-cmake",
"host": true "host": true
}, },
"volk",
"vulkan-headers", "vulkan-headers",
"vulkan-loader", {
"vulkan-memory-allocator", "name": "vulkan-loader",
"vulkan-utility-libraries", "platform": "!android"
"vulkan-validationlayers"
],
"features": {
"tools": {
"description": "Build Vulkan related tools",
"dependencies": [
"lunarg-vulkantools",
"spirv-reflect",
"spirv-tools",
"vulkan-tools"
]
} }
} ]
} }

View File

@ -2,3 +2,4 @@ set(DETECTED_Vulkan_FOUND "@Vulkan_FOUND@")
set(DETECTED_Vulkan_VERSION "@Vulkan_VERSION@") set(DETECTED_Vulkan_VERSION "@Vulkan_VERSION@")
set(DETECTED_Vulkan_INCLUDE_DIRS "@Vulkan_INCLUDE_DIRS@") set(DETECTED_Vulkan_INCLUDE_DIRS "@Vulkan_INCLUDE_DIRS@")
set(DETECTED_Vulkan_LIBRARIES "@Vulkan_LIBRARIES@") 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:arm-neon-android=fail
vtk-m:arm64-android=fail vtk-m:arm64-android=fail
vtk-m:x64-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 latest openjpeg port (vxl ships with an old version of openjpeg)
# conflicts with qt5-location # conflicts with qt5-location
vxl:arm-neon-android=skip vxl:arm-neon-android=skip

View File

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

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "d007fc919e0734e139f89d285000d2d166315f73",
"version": "0.8.1",
"port-version": 2
},
{ {
"git-tree": "89a94b29c6cf63fb3e99c979281751279f02031e", "git-tree": "89a94b29c6cf63fb3e99c979281751279f02031e",
"version": "0.8.1", "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": [ "versions": [
{
"git-tree": "d90089cebfde86dcb2c554b9e45271889503fc36",
"version": "1.3.268.0",
"port-version": 1
},
{ {
"git-tree": "0849291de2e14ef941d30aef9a17e45547329e44", "git-tree": "0849291de2e14ef941d30aef9a17e45547329e44",
"version": "1.3.268.0", "version": "1.3.268.0",

View File

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