Skip to content

Commit 7186048

Browse files
committed
FFmpeg: Reduce overlinking
- We don't make use of any part of avdevice, avfilter, or postproc, so remove all of those from the package COMPONENTS list. - In addition, the deprecated avresample will only be linked/used if swresample is not present on the system.
1 parent 3d804c4 commit 7186048

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,14 @@ mark_as_advanced(QT_VERSION_STR)
284284

285285
################### FFMPEG #####################
286286
# Find FFmpeg libraries (used for video encoding / decoding)
287-
find_package(FFmpeg REQUIRED COMPONENTS avcodec avdevice avformat avutil swscale)
287+
find_package(FFmpeg REQUIRED COMPONENTS avcodec avformat avutil swscale)
288288

289-
set(all_comps avcodec avdevice avformat avfilter avutil postproc swscale swresample avresample)
289+
set(all_comps avcodec avformat avutil swscale)
290+
if(TARGET FFmpeg::swresample)
291+
list(APPEND all_comps swresample)
292+
else()
293+
list(APPEND all_comps avresample)
294+
endif()
290295
set(version_comps avcodec avformat avutil)
291296

292297
foreach(ff_comp IN LISTS all_comps)

0 commit comments

Comments
 (0)