Build fixed version of Vulkan-Loader
This commit is contained in:
parent
7fff53cc97
commit
f9adca6082
1 changed files with 20 additions and 25 deletions
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
LUNARG_VERSION="1.2.148.1"
|
LOADER_REPO="https://github.com/BtbN/Vulkan-Loader.git"
|
||||||
LUNARG_SRC="https://sdk.lunarg.com/sdk/download/${LUNARG_VERSION}/windows/VulkanSDK-${LUNARG_VERSION}-Installer.exe"
|
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $VARIANT != *vulkan* ]] && return -1
|
[[ $VARIANT != *vulkan* ]] && return -1
|
||||||
|
@ -16,32 +15,28 @@ ffbuild_dockerstage() {
|
||||||
ffbuild_dockerbuild() {
|
ffbuild_dockerbuild() {
|
||||||
mkdir vulkan && cd vulkan
|
mkdir vulkan && cd vulkan
|
||||||
|
|
||||||
if [[ $TARGET == win64 ]]; then
|
git-mini-clone "$LOADER_REPO" master loader
|
||||||
wget --no-cookies -O vulkan.exe "$LUNARG_SRC"
|
|
||||||
7z x vulkan.exe Include/vulkan Lib/vulkan-1.lib
|
|
||||||
|
|
||||||
find . -type f -exec chmod 644 {} \;
|
HEADERS_REPO="$(grep -A10 'name.*:.*Vulkan-Headers' loader/scripts/known_good.json | grep url | head -n1 | cut -d'"' -f4)"
|
||||||
find . -type d -exec chmod 755 {} \;
|
HEADERS_COMMIT="$(grep -A10 'name.*:.*Vulkan-Headers' loader/scripts/known_good.json | grep commit | head -n1 | cut -d'"' -f4)"
|
||||||
|
|
||||||
mv Include/* "$FFBUILD_PREFIX"/include/.
|
git-mini-clone "$HEADERS_REPO" "$HEADERS_COMMIT" headers
|
||||||
mv Lib/* "$FFBUILD_PREFIX"/lib/.
|
|
||||||
|
|
||||||
mkdir -p "$FFBUILD_PREFIX"/lib/pkgconfig
|
cd headers
|
||||||
cat > "$FFBUILD_PREFIX"/lib/pkgconfig/vulkan.pc <<EOF
|
|
||||||
prefix=$FFBUILD_PREFIX
|
|
||||||
libdir=\${prefix}/lib
|
|
||||||
includedir=\${prefix}/include
|
|
||||||
|
|
||||||
Name: Vulkan-Loader
|
mkdir build && cd build
|
||||||
Description: Vulkan Loader
|
|
||||||
Version: $LUNARG_VERSION
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" ..
|
||||||
Libs: -L\${libdir} -lvulkan-1 -ladvapi32
|
make -j$(nproc)
|
||||||
Cflags: -I\${includedir}
|
make install
|
||||||
EOF
|
|
||||||
else
|
cd ../../loader
|
||||||
echo "Target not supported"
|
|
||||||
return -1
|
mkdir build && cd build
|
||||||
fi
|
|
||||||
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_TESTS=OFF ..
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf vulkan
|
rm -rf vulkan
|
||||||
|
|
Loading…
Reference in a new issue