mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -25,23 +25,12 @@ if(NOT HAVE_FFMPEG AND WIN32 AND NOT ARM AND NOT OPENCV_FFMPEG_SKIP_DOWNLOAD)
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_FFMPEG AND PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(FFMPEG libavcodec libavformat libavutil libswscale QUIET)
|
||||
pkg_check_modules(FFMPEG_libavresample libavresample QUIET) # optional
|
||||
ocv_check_modules(FFMPEG libavcodec libavformat libavutil libswscale)
|
||||
if(FFMPEG_FOUND)
|
||||
ocv_check_modules(FFMPEG_libavresample libavresample) # optional
|
||||
if(FFMPEG_libavresample_FOUND)
|
||||
list(APPEND FFMPEG_LIBRARIES ${FFMPEG_libavresample_LIBRARIES})
|
||||
endif()
|
||||
# rewrite libraries to absolute paths
|
||||
foreach(lib ${FFMPEG_LIBRARIES})
|
||||
find_library(FFMPEG_ABSOLUTE_${lib} "${lib}" PATHS "${FFMPEG_lib${lib}_LIBDIR}" "${FFMPEG_LIBRARY_DIRS}" NO_DEFAULT_PATH)
|
||||
if(FFMPEG_ABSOLUTE_${lib})
|
||||
list(APPEND ffmpeg_abs_libs "${FFMPEG_ABSOLUTE_${lib}}")
|
||||
else()
|
||||
list(APPEND ffmpeg_abs_libs "${lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(FFMPEG_LIBRARIES "${ffmpeg_abs_libs}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user