ffmpeg version control for cmake

This commit is contained in:
Lukas Cone 2021-07-16 16:53:52 +02:00
parent 0d1a9faf79
commit 42f97bf7a6

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()