From 14f7bb09a886a56ce56664185b6f11b2ea15606e Mon Sep 17 00:00:00 2001 From: Darby Johnston Date: Mon, 26 Aug 2024 17:57:52 -0700 Subject: [PATCH] build: Add proper detection of new FFmpeg versions (#4394) Correctly detect new versions of FFmpeg (6.1 and 7.0). The FFmpeg versions page was used for reference: https://www.ffmpeg.org/download.html#releases Signed-off-by: Darby Johnston Signed-off-by: Zach Lewis --- src/cmake/modules/FindFFmpeg.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmake/modules/FindFFmpeg.cmake b/src/cmake/modules/FindFFmpeg.cmake index 3f034234ab..c49e9623f8 100644 --- a/src/cmake/modules/FindFFmpeg.cmake +++ b/src/cmake/modules/FindFFmpeg.cmake @@ -73,7 +73,11 @@ if (FFMPEG_INCLUDES) REGEX "^#define LIBAVCODEC_VERSION_MICRO .*$") string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO "${TMP}") set (LIBAVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}") - if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.3.100) + if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 61.3.100) + set (FFMPEG_VERSION 7.0) + elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.31.102) + set (FFMPEG_VERSION 6.1) + elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.3.100) set (FFMPEG_VERSION 6.0) elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100) set (FFMPEG_VERSION 5.1)