From ce8161e0cf7610fdf956027ba337ee14ecde6c78 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 7 Oct 2023 13:08:15 -0700
Subject: [PATCH] Make sure we're building with ffmpeg 6.0 or newer
---
test/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f7d46f101bf5..296904534d09 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -184,11 +184,11 @@ endif()
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
include("${SDL3_SOURCE_DIR}/cmake/FindFFmpeg.cmake")
-if(FFmpeg_FOUND)
+if(FFmpeg_FOUND AND FFmpeg_AVCODEC_VERSION VERSION_GREATER_EQUAL "60")
add_sdl_test_executable(testffmpeg NO_C90 SOURCES testffmpeg.c ${icon_bmp_header})
target_link_libraries(testffmpeg PRIVATE ${FFMPEG_LIBRARIES})
else()
- message(STATUS "Can't find ffmpeg, skipping testffmpeg")
+ message(STATUS "Can't find ffmpeg 6.0 or newer, skipping testffmpeg")
endif()
add_sdl_test_executable(checkkeys SOURCES checkkeys.c)