From 977ccda30f6c12c0a63af8f22abd2c6c5867257d Mon Sep 17 00:00:00 2001 From: zhupengfei Date: Thu, 3 Oct 2019 09:35:08 +0800 Subject: [PATCH] CMakeLists: Fix `find_package` call Fixes #4959 Previously options for video dumper and audio decoder is separated, but I forgot to split this `find_package` call so that the other libraries won't be necessary when only using the audio decoder. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1afb4b82..41d55f375 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,7 +209,11 @@ if (ENABLE_FFMPEG) endif() endif() - find_package(FFmpeg REQUIRED COMPONENTS avcodec avformat avutil swscale swresample) + if (ENABLE_FFMPEG_VIDEO_DUMPER) + find_package(FFmpeg REQUIRED COMPONENTS avcodec avformat avutil swscale swresample) + else() + find_package(FFmpeg REQUIRED COMPONENTS avcodec) + endif() if ("${FFmpeg_avcodec_VERSION}" VERSION_LESS "57.48.101") message(FATAL_ERROR "Found version for libavcodec is too low. The required version is at least 57.48.101 (included in FFmpeg 3.1 and later).") endif()