From 336ef58f61af1f1e7c955bee20761926a7c6c9f4 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 2 Jan 2023 01:49:02 +1000 Subject: [PATCH] CMake: Search specifically for the ffmpeg components we need And fix the not-found logic. --- cmake/SearchForStuff.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 5d1045b5de..ea84fd65cc 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -35,8 +35,8 @@ else() # Use bundled ffmpeg v4.x.x headers if we can't locate it in the system. # We'll try to load it dynamically at runtime. - find_package(FFMPEG) - if(NOT FFMPEG_VERSION) + find_package(FFMPEG COMPONENTS avcodec avformat avutil swresample swscale) + if(NOT FFMPEG_FOUND) message(WARNING "FFmpeg not found, using bundled headers.") set(FFMPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/3rdparty/ffmpeg/include") endif()