Merge pull request #895 from PredatorCZ/master

ffmpeg version control for cmake
This commit is contained in:
bnnm 2021-07-17 11:01:52 +02:00 committed by GitHub
commit acf2da7bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,17 @@ else()
find_package(FFmpeg)
if(NOT FFMPEG_LIBRARIES)
set(USE_FFMPEG OFF)
else()
if(${AVCODEC_VERSION} VERSION_LESS 57)
set(USE_FFMPEG OFF)
message("libavcodec version mismatch ${AVCODEC_VERSION} expected >=57")
elseif(${AVUTIL_VERSION} VERSION_LESS 55)
set(USE_FFMPEG OFF)
message("libavutil version mismatch ${AVUTIL_VERSION} expected >=55")
elseif(${SWRESAMPLE_VERSION} VERSION_LESS 2)
set(USE_FFMPEG OFF)
message("libswresample version mismatch ${SWRESAMPLE_VERSION} expected >=2")
endif()
endif()
endif()