Skip to content

Commit

Permalink
Fix mac ffmpeg version check
Browse files Browse the repository at this point in the history
  • Loading branch information
taoboyang committed Dec 14, 2023
1 parent 8b13e07 commit 2c84eda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ jobs:
echo "ENV PATH=\${PATH}:/opt/python/cp39-cp39/bin" >>${tmp_file}
echo "ENV LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:/opt/python/cp39-cp39/lib" >>${tmp_file}
echo "ENV GITHUB_ACTIONS=${GITHUB_ACTIONS}" >>${tmp_file}
if [ "${{ matrix.device }}" == "gpu" ]; then
echo "ENV CUDA_PATH=/usr/local/cuda" >>${tmp_file}
fi
docker build -t bmf_build:tmp -f ${tmp_file} .
rm -rf ${tmp_file}
docker run --rm -v $(pwd):/root/bmf -w /root/bmf bmf_build:tmp bash -c "./scripts/build_ffmpeg.sh --device=${{ matrix.device }} && git config --global --add safe.directory /root/bmf && ./build.sh"
Expand Down
4 changes: 3 additions & 1 deletion cmake/ffmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ else()
set_property(TARGET ffmpeg::${ARGV0} PROPERTY INTERFACE_LINK_LIBRARIES
${LIBRARY_LINK_LIBRARIES})
unset(LIBRARY CACHE)
if("${ARGV0}" STREQUAL "avutil")
find_ffmpeg_version(${LIBRARY_INCLUDE_DIRS}/libavutil BMF_FFMPEG_VERSION)
endif()
endif()
endfunction()

Expand All @@ -106,7 +109,6 @@ else()
define_ffmpeg_target(swresample)

if(TARGET ffmpeg::avcodec)
find_ffmpeg_version(${FFMPEG_INCLUDE_DIR}/libavutil BMF_FFMPEG_VERSION)
set(FFMPEG_FOUND TRUE)
else()
set(FFMPEG_FOUND FALSE)
Expand Down

0 comments on commit 2c84eda

Please sign in to comment.