From 98b9ed1860a0bead439970b545c80f2d49e695c8 Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Fri, 7 Aug 2020 06:17:38 +0100 Subject: [ffmpeg] fix FindFFMPEG.cmake to work properly even without avresample (#12635) * [ffmpeg] fix FindFFMPEG.cmake to work properly even without avresample When building ffmpeg[core] (without avresample support), FindFFMPEG.cmake claims to not have fully found the ffmpeg libraries, because it still looks for the avresample library. This patch fixes that problem. * [ffmpeg] minor update for consistency Co-authored-by: nicole mazzuca * [ffmpeg] minor update for consistency Co-authored-by: nicole mazzuca Co-authored-by: nicole mazzuca --- ports/ffmpeg/CONTROL | 2 +- ports/ffmpeg/FindFFMPEG.cmake.in | 4 +++- ports/ffmpeg/portfile.cmake | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index b9bdfcba2..c318866af 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,6 +1,6 @@ Source: ffmpeg Version: 4.2 -Port-Version: 16 +Port-Version: 17 Build-Depends: zlib Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index 413c2bee7..7333e6083 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -135,7 +135,9 @@ FFMPEG_FIND(libavcodec avcodec avcodec.h) FFMPEG_FIND(libavdevice avdevice avdevice.h) FFMPEG_FIND(libavfilter avfilter avfilter.h) FFMPEG_FIND(libavformat avformat avformat.h) -FFMPEG_FIND(libavresample avresample avresample.h) +if(@ENABLE_AVRESAMPLE@) + FFMPEG_FIND(libavresample avresample avresample.h) +endif() FFMPEG_FIND(libavutil avutil avutil.h) FFMPEG_FIND(libswresample swresample swresample.h) FFMPEG_FIND(libswscale swscale swscale.h) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 14eb4ae10..6fd6bc988 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -127,8 +127,10 @@ else() set(OPTIONS "${OPTIONS} --disable-bzlib") endif() +set(ENABLE_AVRESAMPLE OFF) if("avresample" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-avresample") + set(ENABLE_AVRESAMPLE ON) #necessary for configuring FFMPEG CMake Module endif() if (VCPKG_TARGET_IS_OSX) -- cgit v1.2.3