aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2020-11-04 07:15:22 +0000
committerGitHub <noreply@github.com>2020-11-03 23:15:22 -0800
commitc98fa197cce8b096fb4e99fb9c17348f198feb6e (patch)
tree036bfd8a3a7a2b0da6913fdf4eed09143409d443
parent78ce9413a8cd7df0bac034832c4bbe6b09a28c9b (diff)
downloadvcpkg-c98fa197cce8b096fb4e99fb9c17348f198feb6e.tar.gz
vcpkg-c98fa197cce8b096fb4e99fb9c17348f198feb6e.zip
[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
-rw-r--r--ports/ffmpeg/CONTROL2
-rw-r--r--ports/ffmpeg/FindFFMPEG.cmake.in26
2 files changed, 16 insertions, 12 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index 3a42c7807..32520c8ed 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -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.
diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in
index 03dfcea0f..57e5315b8 100644
--- a/ports/ffmpeg/FindFFMPEG.cmake.in
+++ b/ports/ffmpeg/FindFFMPEG.cmake.in
@@ -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()