aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2020-08-22 00:47:31 +0200
committerGitHub <noreply@github.com>2020-08-21 15:47:31 -0700
commit0ccb9d314830f0faa1be0c10168b492cc11ecb68 (patch)
treea9516e90d9304ca38b128b470d89146931f8b78e
parent2a91f05e098c31efbdb3d87a091bc7e00dea9f2e (diff)
downloadvcpkg-0ccb9d314830f0faa1be0c10168b492cc11ecb68.tar.gz
vcpkg-0ccb9d314830f0faa1be0c10168b492cc11ecb68.zip
[ffmpeg] fix cmake module (#13004)
-rw-r--r--ports/ffmpeg/CONTROL2
-rw-r--r--ports/ffmpeg/FindFFMPEG.cmake.in34
2 files changed, 32 insertions, 4 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index 44f63079c..c9ea04fa4 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.2
-Port-Version: 20
+Port-Version: 21
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 5eee6e73f..778666a75 100644
--- a/ports/ffmpeg/FindFFMPEG.cmake.in
+++ b/ports/ffmpeg/FindFFMPEG.cmake.in
@@ -33,7 +33,10 @@ set(FFMPEG_VERSION "4.2")
find_dependency(Threads)
if(UNIX)
- list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread -lX11)
+ list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread)
+endif()
+if(UNIX AND NOT APPLE)
+ list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -lX11)
endif()
if(@ENABLE_BZIP2@)
@@ -206,10 +209,12 @@ macro(FFMPEG_FIND varname shortname headername)
endif()
if(NOT FFMPEG_${varname}_LIBRARY)
find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH)
- find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname} PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH)
+ find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH)
get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY)
get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY)
- select_library_configurations(FFMPEG_${varname})
+ #select_library_configurations(FFMPEG_${varname})
+ set(FFMPEG_${varname}_LIBRARY "$<$<CONFIG:Debug>:${FFMPEG_${varname}_LIBRARY_DEBUG}>$<$<CONFIG:Release>:${FFMPEG_${varname}_LIBRARY_RELEASE}>" CACHE STRING "")
+ set(FFMPEG_${varname}_LIBRARIES ${FFMPEG_${varname}_LIBRARY} CACHE STRING "")
endif()
if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS)
set(FFMPEG_${varname}_FOUND TRUE BOOL)
@@ -277,6 +282,29 @@ endif()
if (FFMPEG_libavutil_FOUND)
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS)
+ set(FFMPEG_libavutil_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+
+ if(FFMPEG_libavcodec_FOUND)
+ set(FFMPEG_libavcodec_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ if(FFMPEG_libavdevice_FOUND)
+ set(FFMPEG_libavdevice_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ if(FFMPEG_libavfilter_FOUND)
+ set(FFMPEG_libavfilter_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ if(FFMPEG_libavformat_FOUND)
+ set(FFMPEG_libavformat_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ if(FFMPEG_libavresample_FOUND)
+ set(FFMPEG_libavresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ if(FFMPEG_libswresample_FOUND)
+ set(FFMPEG_libswresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ if(FFMPEG_libswscale_FOUND)
+ set(FFMPEG_libswscale_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
list(APPEND FFMPEG_LIBRARIES
${FFMPEG_PLATFORM_DEPENDENT_LIBS}