mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 13:45:23 +08:00
[ffmpeg] Fix static linking on Windows, FindFFMPEG (#7739)
This adds zlib as dependency to make it possible to find in FindFFMPEG.cmake. Also FFmpeg likes to autodetect zlib for additional features on compilation. This removes the check for stdint.h, as it is included since MSVC 2010 and does not always find it. To enable static linking on windows, bcript had to be added: avutil.lib(random_seed.o) : error LNK2019: unresolved external symbol _BCryptOpenAlgorithmProvider@16 referenced in function _av_get_random_seed avutil.lib(random_seed.o) : error LNK2019: unresolved external symbol _BCryptCloseAlgorithmProvider@8 referenced in function _av_get_random_seed avutil.lib(random_seed.o) : error LNK2019: unresolved external symbol _BCryptGenRandom@16 referenced in function _av_get_random_seed
This commit is contained in:
parent
81258880b1
commit
9a6f38041f
@ -1,5 +1,6 @@
|
||||
Source: ffmpeg
|
||||
Version: 4.1-10
|
||||
Version: 4.1-11
|
||||
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.
|
||||
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.
|
||||
|
@ -46,7 +46,7 @@ endif()
|
||||
# Platform dependent libraries required by FFMPEG
|
||||
if(WIN32)
|
||||
if(NOT CYGWIN)
|
||||
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 Secur32)
|
||||
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 Secur32 bcrypt)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS m)
|
||||
@ -88,15 +88,8 @@ macro(FFMPEG_FIND_GENEX varname shortname headername)
|
||||
endmacro(FFMPEG_FIND_GENEX)
|
||||
|
||||
if(WIN32)
|
||||
if(NOT FFMPEG_${varname}_INCLUDE_DIRS)
|
||||
find_path(FFMPEG_stdint_INCLUDE_DIRS NAMES stdint.h PATH_SUFFIXES ffmpeg)
|
||||
endif()
|
||||
if (FFMPEG_stdint_INCLUDE_DIRS)
|
||||
set(STDINT_OK TRUE)
|
||||
endif()
|
||||
FFMPEG_FIND_GENEX(libzlib zlib zlib.h)
|
||||
else()
|
||||
set(STDINT_OK TRUE)
|
||||
FFMPEG_FIND_GENEX(libzlib z zlib.h)
|
||||
endif()
|
||||
|
||||
@ -137,8 +130,8 @@ FFMPEG_FIND(libavutil avutil avutil.h)
|
||||
FFMPEG_FIND(libswresample swresample swresample.h)
|
||||
FFMPEG_FIND(libswscale swscale swscale.h)
|
||||
|
||||
if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_FOUND AND FFMPEG_libavformat_FOUND AND FFMPEG_libavutil_FOUND AND FFMPEG_libswresample_FOUND AND FFMPEG_libswscale_FOUND AND FFMPEG_libzlib_FOUND AND STDINT_OK)
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_libavformat_INCLUDE_DIRS} ${FFMPEG_libavdevice_INCLUDE_DIRS} ${FFMPEG_libavcodec_INCLUDE_DIRS} ${FFMPEG_libavutil_INCLUDE_DIRS} ${FFMPEG_libswscale_INCLUDE_DIRS} ${FFMPEG_stdint_INCLUDE_DIRS})
|
||||
if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_FOUND AND FFMPEG_libavformat_FOUND AND FFMPEG_libavutil_FOUND AND FFMPEG_libswresample_FOUND AND FFMPEG_libswscale_FOUND AND FFMPEG_libzlib_FOUND)
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_libavformat_INCLUDE_DIRS} ${FFMPEG_libavdevice_INCLUDE_DIRS} ${FFMPEG_libavcodec_INCLUDE_DIRS} ${FFMPEG_libavutil_INCLUDE_DIRS} ${FFMPEG_libswscale_INCLUDE_DIRS})
|
||||
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user