forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vulkan-sdk-components] Use separate port for the SDK (microsoft#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
- Loading branch information
Showing
17 changed files
with
155 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "efe1324e0d30a235687686111be4daa4605083e6", | ||
"version": "1.3.268.0", | ||
"port-version": 0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters