[ffmpeg] add if guard, fix library ordering on linux, minor clean up (#14360)

* [ffmpeg] add 'if(NOT FFMPEG_FOUND)' guard to FindFFMPEG script

* [ffmpeg] fix link order on x64-linux (dependencies must come after the library that needs the dependency)

* [ffmpeg] bump port version
This commit is contained in:
Matthias C. M. Troffaes 2020-11-04 07:15:22 +00:00 committed by GitHub
parent 78ce9413a8
commit c98fa197cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions

View File

@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.1
Port-Version: 5
Port-Version: 6
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.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

View File

@ -25,9 +25,11 @@
#
#
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake)
include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)
include(CMakeFindDependencyMacro)
if(NOT FFMPEG_FOUND)
function(select_library_configurations_from_names)
cmake_parse_arguments(_slc "" "BASENAME" "NAMES;NAMES_RELEASE;NAMES_DEBUG" ${ARGN})
@ -60,7 +62,7 @@ function(select_library_configurations_from_targets)
set(${_slc_BASENAME}_LIBRARIES ${${_slc_BASENAME}_LIBRARIES} PARENT_SCOPE)
endfunction()
set(FFMPEG_VERSION "4.2")
set(FFMPEG_VERSION "4.3.1")
find_dependency(Threads)
if(UNIX)
@ -259,22 +261,21 @@ if(APPLE)
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${VT_UNIT} ${AT_UNIT} ${SEC_UNIT} ${CF_UNIT} ${CM_UNIT} ${CV_UNIT})
endif()
if(@ENABLE_AVCODEC@)
FFMPEG_FIND(libavcodec avcodec avcodec.h)
endif()
if(@ENABLE_AVDEVICE@)
FFMPEG_FIND(libavdevice avdevice avdevice.h)
endif()
if(@ENABLE_AVFILTER@)
FFMPEG_FIND(libavfilter avfilter avfilter.h)
endif()
if(@ENABLE_AVFORMAT@)
FFMPEG_FIND(libavformat avformat avformat.h)
endif()
if(@ENABLE_AVCODEC@)
FFMPEG_FIND(libavcodec avcodec avcodec.h)
endif()
if(@ENABLE_AVFILTER@)
FFMPEG_FIND(libavfilter avfilter avfilter.h)
endif()
if(@ENABLE_AVRESAMPLE@)
FFMPEG_FIND(libavresample avresample avresample.h)
endif()
FFMPEG_FIND(libavutil avutil avutil.h)
if(@ENABLE_POSTPROC@)
FFMPEG_FIND(libpostproc postproc postprocess.h)
endif()
@ -284,6 +285,7 @@ endif()
if(@ENABLE_SWSCALE@)
FFMPEG_FIND(libswscale swscale swscale.h)
endif()
FFMPEG_FIND(libavutil avutil avutil.h)
if (FFMPEG_libavutil_FOUND)
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
@ -325,3 +327,5 @@ if (FFMPEG_libavutil_FOUND)
endif()
find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS)
endif()