Meta: Add overlay port for vulkan-loader

In order to pass the proper pkg-config on aarch64 linux, we need
to patch this port to use vcpkg's own find_tool infrastructure.
This commit is contained in:
Andrew Kaster 2024-07-06 06:26:46 -06:00 committed by Daniel Bertalan
parent 0a16a09993
commit a3e24163aa
Notes: sideshowbarker 2024-07-17 03:05:16 +09:00
4 changed files with 52 additions and 1 deletions

View file

@ -0,0 +1,29 @@
set(VCPKG_LIBRARY_LINKAGE dynamic)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/Vulkan-Loader
REF "vulkan-sdk-${VERSION}"
SHA512 8ec98e0da867f829e048e100a97d7b94a3c40f56f858e3eb81f11f6f58e20e59da6ca8785a9642958ff3b698c618b9968407028cc66dfa0ad296576bf9db45ca
HEAD_REF main
)
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTS:BOOL=OFF
-DPKG_CONFIG_EXECUTABLE="${PKGCONFIG}"
#-DBUILD_WSI_XCB_SUPPORT=OFF
#-DBUILD_WSI_XLIB_SUPPORT=OFF
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/VulkanLoader" PACKAGE_NAME VulkanLoader)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)

View file

@ -0,0 +1,2 @@
The package @PORT@ provides the vulkan loader.
Please be aware of https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderApplicationInterface.md#bundling-the-loader-with-an-application

View file

@ -0,0 +1,19 @@
{
"name": "vulkan-loader",
"version": "1.3.280.0",
"description": "Vulkan Development Tools",
"homepage": "https://github.com/KhronosGroup/Vulkan-Loader",
"license": null,
"supports": "!android",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"vulkan-headers"
]
}

View file

@ -5,5 +5,6 @@
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip", "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
"name": "microsoft" "name": "microsoft"
} }
] ],
"overlay-ports": [ "Meta/CMake/vcpkg/overlay-ports" ]
} }