2021-11-12 19:46:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-12 15:54:12 +00:00
|
|
|
SCRIPT_REPO="https://github.com/KhronosGroup/Vulkan-Headers.git"
|
2023-03-19 11:26:11 +00:00
|
|
|
SCRIPT_COMMIT="v1.3.244"
|
2022-07-12 17:55:52 +00:00
|
|
|
SCRIPT_TAGFILTER="v?.*.*"
|
2021-11-12 19:46:07 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
[[ $ADDINS_STR == *4.4* ]] && return -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
2022-07-12 15:54:12 +00:00
|
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" vkheaders
|
2021-11-12 19:46:07 +00:00
|
|
|
cd vkheaders
|
|
|
|
|
|
|
|
mkdir build && cd build
|
|
|
|
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" ..
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
|
|
|
|
|
|
|
cat >"$FFBUILD_PREFIX"/lib/pkgconfig/vulkan.pc <<EOF
|
|
|
|
prefix=$FFBUILD_PREFIX
|
|
|
|
includedir=\${prefix}/include
|
|
|
|
|
|
|
|
Name: vulkan
|
2022-07-12 15:54:12 +00:00
|
|
|
Version: ${SCRIPT_COMMIT:1}
|
2021-11-12 19:46:07 +00:00
|
|
|
Description: Vulkan (Headers Only)
|
|
|
|
Cflags: -I\${includedir}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-vulkan
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
echo --disable-vulkan
|
|
|
|
}
|