mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-27 15:16:59 +08:00
Build shared FFmpeg on Linux and set dependencies to stubs
Task-number: QTBUG-120990
Change-Id: I8fccf8ef58cf6334e71287450ee30cc2256516d9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 83adc86c53)
This commit is contained in:
@@ -71,11 +71,31 @@ build_ffmpeg() {
|
||||
}
|
||||
|
||||
if [ "$os" == "linux" ]; then
|
||||
# TODO: install patchelf on RHEL and remove the force "static"
|
||||
if [ -f "/etc/redhat-release" ]; then
|
||||
build_type="static"
|
||||
else
|
||||
build_type="$2"
|
||||
fi
|
||||
|
||||
install_ff_nvcodec_headers
|
||||
|
||||
ffmpeg_config_options+=" --enable-openssl"
|
||||
|
||||
if [ "$build_type" != "static" ]; then
|
||||
ffmpeg_config_options+=" --enable-shared --disable-static"
|
||||
fi
|
||||
|
||||
build_ffmpeg
|
||||
sudo mv "$ffmpeg_source_dir/build/installed/usr/local/$ffmpeg_name" "/usr/local"
|
||||
|
||||
output_dir="$ffmpeg_source_dir/build/installed/usr/local/$ffmpeg_name"
|
||||
|
||||
if [ "$build_type" != "static" ]; then
|
||||
fix_dependencies="${BASH_SOURCE%/*}/../linux/fix_ffmpeg_dependencies.sh"
|
||||
"$fix_dependencies" "$output_dir"
|
||||
fi
|
||||
|
||||
sudo mv "$output_dir" "/usr/local"
|
||||
SetEnvVar "FFMPEG_DIR" "/usr/local/$ffmpeg_name"
|
||||
|
||||
elif [ "$os" == "macos" ] || [ "$os" == "macos-universal" ]; then
|
||||
@@ -111,3 +131,5 @@ elif [ "$os" == "macos" ] || [ "$os" == "macos-universal" ]; then
|
||||
|
||||
SetEnvVar "FFMPEG_DIR" "/usr/local/$ffmpeg_name"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user