mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:43:02 +08:00
[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:
parent
78ce9413a8
commit
c98fa197cc
@ -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.
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user