2020-09-07 20:28:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
GLSLANG_REPO="https://github.com/KhronosGroup/glslang.git"
|
2021-10-28 18:47:11 +00:00
|
|
|
GLSLANG_COMMIT="d1608ab1ef17f1488bdcbfe11f2c3c96ac482fce"
|
2020-09-07 20:28:47 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
2021-05-13 00:17:17 +00:00
|
|
|
# Pointless without Vulkan
|
|
|
|
[[ $TARGET == linux* ]] && return -1
|
|
|
|
|
2020-09-07 20:28:47 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
git-mini-clone "$GLSLANG_REPO" "$GLSLANG_COMMIT" glslang
|
|
|
|
cd glslang
|
|
|
|
|
|
|
|
python3 ./update_glslang_sources.py
|
|
|
|
|
|
|
|
mkdir build && cd build
|
|
|
|
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DBUILD_EXTERNAL=ON -DBUILD_TESTING=OFF -DENABLE_CTEST=OFF -DENABLE_HLSL=ON -DENABLE_GLSLANG_BINARIES=OFF ..
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-libglslang
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
echo --disable-libglslang
|
|
|
|
}
|