# Description: Meta loader for Vulkan API
# URL: https://github.com/zeux/volk
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: vulkan-loader

name=volk
version=1.3.280.0
_version=vulkan-sdk-$version
release=1
source=(https://github.com/zeux/volk/archive/$_version/$name-$version.tar.gz)

build() {
  cmake -S volk-$_version -B build -G Ninja \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_INSTALL_LIBDIR=lib \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
    -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
    -D VOLK_INSTALL=True \
    -Wno-dev
  cmake --build build
  DESTDIR=$PKG cmake --install build
}
