Skip to content

Commit

Permalink
[skia] Fix vulkan feature
Browse files Browse the repository at this point in the history
Use vendored copies of headers and tools, as already done by feature 'dawn'.
Guard vulkan inclusion in vulkanmemoryallocator as would be done in vendored copy.
  • Loading branch information
dg0yt committed Jul 25, 2023
1 parent d765306 commit 52cba7a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
12 changes: 11 additions & 1 deletion ports/skia/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,17 @@ if("metal" IN_LIST FEATURES)
endif()

if("vulkan" IN_LIST FEATURES)
list(APPEND required_externals
vulkan-headers
vulkan-tools
)
string(APPEND OPTIONS " skia_use_vulkan=true")
file(COPY "${CURRENT_INSTALLED_DIR}/include/vk_mem_alloc.h" DESTINATION "${SOURCE_PATH}/third_party/vulkanmemoryallocator")
file(COPY "${CURRENT_INSTALLED_DIR}/include/vk_mem_alloc.h" DESTINATION "${SOURCE_PATH}/third_party/externals/vulkanmemoryallocator/include")
# Cf. third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.h:25
vcpkg_replace_string("${SOURCE_PATH}/third_party/externals/vulkanmemoryallocator/include/vk_mem_alloc.h"
"#include <vulkan/vulkan.h>"
"#ifndef VULKAN_H_\n #include <vulkan/vulkan.h>\n#endif"
)
endif()

if("direct3d" IN_LIST FEATURES)
Expand Down Expand Up @@ -230,6 +239,7 @@ They can be installed on Debian based systems via
)
endif()

list(REMOVE_DUPLICATES required_externals)
get_externals(${required_externals})
if(EXISTS "${SOURCE_PATH}/third_party/externals/dawn/generator/dawn_version_generator.py")
vcpkg_find_acquire_program(GIT)
Expand Down
3 changes: 1 addition & 2 deletions ports/skia/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "skia",
"version": "0.36.0",
"port-version": 7,
"port-version": 8,
"description": [
"Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms.",
"It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.",
Expand Down Expand Up @@ -136,7 +136,6 @@
"vulkan": {
"description": "Vulkan support for skia",
"dependencies": [
"vulkan",
"vulkan-memory-allocator"
]
}
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7578,7 +7578,7 @@
},
"skia": {
"baseline": "0.36.0",
"port-version": 7
"port-version": 8
},
"skyr-url": {
"baseline": "1.13.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/skia.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "49678515153e01e17bca9a3b2cd0445af43d1ebf",
"version": "0.36.0",
"port-version": 8
},
{
"git-tree": "508710af38e0b50675532741bf899ec4c3f20c3b",
"version": "0.36.0",
Expand Down

0 comments on commit 52cba7a

Please sign in to comment.