2022-07-04 07:53:35 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
builddir="$(dirname "$0")"
|
|
|
|
|
|
|
|
pushd "$builddir"
|
|
|
|
|
2022-11-23 16:50:22 -06:00
|
|
|
rm -rf ./build ./build-10 ./build-12
|
|
|
|
|
2023-03-21 12:23:27 -05:00
|
|
|
if [ ! -d "./x265_git" ]; then
|
|
|
|
git clone --depth 1 --branch 3.4.1 "https://bitbucket.org/multicoreware/x265_git.git"
|
2022-07-04 07:53:35 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
cmake -S x265_git/source -B build-12 \
|
|
|
|
-DCMAKE_INSTALL_PREFIX='/home/rudism/.local' \
|
|
|
|
-DCMAKE_ASM_NASM_FLAGS='-w-macro-params-legacy' \
|
|
|
|
-DENABLE_ASSEMBLY='ON' \
|
|
|
|
-DENABLE_LIBNUMA='ON' \
|
|
|
|
-DHIGH_BIT_DEPTH='ON' \
|
|
|
|
-DMAIN12='ON' \
|
|
|
|
-DEXPORT_C_API='OFF' \
|
|
|
|
-DENABLE_CLI='OFF' \
|
|
|
|
-DENABLE_SHARED='OFF' \
|
|
|
|
-Wno-dev
|
|
|
|
make -C build-12
|
|
|
|
|
|
|
|
cmake -S x265_git/source -B build-10 \
|
|
|
|
-DCMAKE_INSTALL_PREFIX='/home/rudism/.local' \
|
|
|
|
-DCMAKE_ASM_NASM_FLAGS='-w-macro-params-legacy' \
|
|
|
|
-DENABLE_ASSEMBLY='ON' \
|
|
|
|
-DENABLE_LIBNUMA='ON' \
|
|
|
|
-DHIGH_BIT_DEPTH='ON' \
|
|
|
|
-DEXPORT_C_API='OFF' \
|
|
|
|
-DENABLE_CLI='OFF' \
|
|
|
|
-DENABLE_SHARED='OFF' \
|
|
|
|
-Wno-dev
|
|
|
|
make -C build-10
|
|
|
|
|
|
|
|
cmake -S x265_git/source -B build \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH='/home/rudism/.local' \
|
|
|
|
-DCMAKE_ASM_NASM_FLAGS='-w-macro-params-legacy' \
|
|
|
|
-DENABLE_ASSEMBLY='ON' \
|
|
|
|
-DENABLE_SHARED='ON' \
|
|
|
|
-DENABLE_LIBNUMA='ON' \
|
|
|
|
-DENABLE_HDR10_PLUS='ON' \
|
|
|
|
-DEXTRA_LIB='x265_main10.a;x265_main12.a' \
|
|
|
|
-DEXTRA_LINK_FLAGS='-L.' \
|
|
|
|
-DLINKED_10BIT='ON' \
|
|
|
|
-DLINKED_12BIT='ON' \
|
|
|
|
-Wno-dev
|
|
|
|
|
|
|
|
ln -s ../build-10/libx265.a build/libx265_main10.a
|
|
|
|
ln -s ../build-12/libx265.a build/libx265_main12.a
|
|
|
|
make -C build
|
|
|
|
|
|
|
|
make -C build install
|
|
|
|
|
|
|
|
popd
|