Merge pull request #5059 from Orphis/ffmpeg_windows
cmake: Find bundled ffmpeg even if you have pkg-config on Win32
This commit is contained in:
commit
9b5a0b3f2d
|
@ -60,7 +60,9 @@ macro(check_libav)
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
pkg_check_modules(LIBAV libavcodec>=54.35.0 libavformat>=54.20.4
|
pkg_check_modules(LIBAV libavcodec>=54.35.0 libavformat>=54.20.4
|
||||||
libswscale>=2.1.1 libavutil>=52.3.0)
|
libswscale>=2.1.1 libavutil>=52.3.0)
|
||||||
else()
|
endif()
|
||||||
|
|
||||||
|
if(NOT LIBAV_FOUND)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_library(avcodec STATIC IMPORTED)
|
add_library(avcodec STATIC IMPORTED)
|
||||||
set_target_properties(avcodec PROPERTIES
|
set_target_properties(avcodec PROPERTIES
|
||||||
|
@ -114,6 +116,7 @@ macro(check_libav)
|
||||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LIBAV_FOUND)
|
if(LIBAV_FOUND)
|
||||||
message(STATUS "libav/ffmpeg found, enabling AVI frame dumps")
|
message(STATUS "libav/ffmpeg found, enabling AVI frame dumps")
|
||||||
add_definitions(-DHAVE_LIBAV)
|
add_definitions(-DHAVE_LIBAV)
|
||||||
|
|
Loading…
Reference in New Issue