# Copyright 1999-2026 The Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Vulkan Memory Allocator: easy-to-integrate Vulkan memory allocation library"
HOMEPAGE="
	https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
"
SRC_URI="
	https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/archive/refs/tags/v${PV}.tar.gz
		-> ${P}.tar.gz
"
S="${WORKDIR}/VulkanMemoryAllocator-${PV}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

# The library is a single header (INTERFACE target); nothing is compiled.
# Consumers include <vk_mem_alloc.h>, which in turn includes <vulkan/vulkan.h>.
DEPEND="
	dev-util/vulkan-headers
"
RDEPEND="${DEPEND}"

src_configure() {
	local mycmakeargs=(
		-DVMA_ENABLE_INSTALL=ON
		-DVMA_BUILD_SAMPLES=OFF
		-DVMA_BUILD_DOCUMENTATION=OFF
	)
	cmake_src_configure
}