FFmpeg-Builds/scripts.d/50-vulkan/60-libplacebo.sh
2022-08-16 12:44:22 +02:00

62 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
SCRIPT_REPO="https://code.videolan.org/videolan/libplacebo.git"
SCRIPT_COMMIT="0f0e3b36824ab3ebde6844040f3a4399a4628592"
ffbuild_enabled() {
[[ $ADDINS_STR == *4.4* ]] && return -1
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" placebo
cd placebo
git submodule update --init --recursive
mkdir build && cd build
local myconf=(
--prefix="$FFBUILD_PREFIX"
--buildtype=release
--default-library=static
-Dvulkan=enabled
-Dvulkan-link=false
-Dvulkan-registry="$FFBUILD_PREFIX"/share/vulkan/registry/vk.xml
-Dshaderc=enabled
-Dglslang=disabled
-Ddemos=false
-Dtests=false
-Dbench=false
-Dfuzz=false
)
if [[ $TARGET == win* ]]; then
myconf+=(
-Dd3d11=enabled
)
fi
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--cross-file=/cross.meson
)
else
echo "Unknown target"
return -1
fi
meson "${myconf[@]}" ..
ninja -j$(nproc)
ninja install
echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libplacebo.pc
}
ffbuild_configure() {
echo --enable-libplacebo
}
ffbuild_unconfigure() {
[[ $ADDINS_STR == *4.4* ]] && return 0
echo --disable-libplacebo
}