cmake: Find bundled ffmpeg even if you have pkg-config on Win32

This commit is contained in:
Florent Castelli 2017-03-10 14:45:19 +01:00
parent ae0f9c200d
commit d2119d35fb

View File

@ -60,7 +60,9 @@ macro(check_libav)
if(PKG_CONFIG_FOUND)
pkg_check_modules(LIBAV libavcodec>=54.35.0 libavformat>=54.20.4
libswscale>=2.1.1 libavutil>=52.3.0)
else()
endif()
if(NOT LIBAV_FOUND)
if(WIN32)
add_library(avcodec STATIC IMPORTED)
set_target_properties(avcodec PROPERTIES
@ -114,6 +116,7 @@ macro(check_libav)
unset(CMAKE_REQUIRED_LIBRARIES)
endif()
endif()
if(LIBAV_FOUND)
message(STATUS "libav/ffmpeg found, enabling AVI frame dumps")
add_definitions(-DHAVE_LIBAV)