adofai-ffmpeg-builder/scripts/build-libmfx.sh

31 lines
664 B
Bash
Raw Normal View History

projectDir=$workDir/mfx
# git clone https://github.com/lu-zero/mfx_dispatch $projectDir --depth 1
rm -rf $projectDir
mkdir $projectDir
cd $projectDir
git init
git remote add origin https://github.com/lu-zero/mfx_dispatch
2023-05-22 19:50:18 +09:00
git fetch --depth 1 origin "1.35.1"
git checkout FETCH_HEAD
2023-05-22 19:50:18 +09:00
git am ../../patches/mfx/*
rm -rf build
mkdir build
cd build
2023-05-22 19:50:18 +09:00
export CFLAGS="$CFLAGS -static-libgcc -static-libstdc++ -static"
export CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++ -static"
export LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
cmake --install .