Add SWRESAMPLE libs

This commit is contained in:
Isaac Connor 2018-10-24 13:10:54 -04:00
parent 9148d3f7c4
commit 1fa13e5757
1 changed files with 18 additions and 1 deletions

View File

@ -602,7 +602,7 @@ if(NOT ZM_NO_FFMPEG)
set(optlibsnotfound "${optlibsnotfound} SWScale") set(optlibsnotfound "${optlibsnotfound} SWScale")
endif(SWSCALE_LIBRARIES) endif(SWSCALE_LIBRARIES)
# rescale (using find_library and find_path) # AVresample (using find_library and find_path)
find_library(AVRESAMPLE_LIBRARIES avresample) find_library(AVRESAMPLE_LIBRARIES avresample)
if(AVRESAMPLE_LIBRARIES) if(AVRESAMPLE_LIBRARIES)
set(HAVE_LIBAVRESAMPLE 1) set(HAVE_LIBAVRESAMPLE 1)
@ -619,6 +619,23 @@ if(NOT ZM_NO_FFMPEG)
set(optlibsnotfound "${optlibsnotfound} AVResample") set(optlibsnotfound "${optlibsnotfound} AVResample")
endif(AVRESAMPLE_LIBRARIES) endif(AVRESAMPLE_LIBRARIES)
# SWresample (using find_library and find_path)
find_library(SWRESAMPLE_LIBRARIES swresample)
if(SWRESAMPLE_LIBRARIES)
set(HAVE_LIBSWRESAMPLE 1)
list(APPEND ZM_BIN_LIBS "${SWRESAMPLE_LIBRARIES}")
find_path(SWRESAMPLE_INCLUDE_DIR "libswresample/swresample.h" /usr/include/ffmpeg)
if(SWRESAMPLE_INCLUDE_DIR)
include_directories("${SWRESAMPLE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${SWRESAMPLE_INCLUDE_DIR}")
endif(SWRESAMPLE_INCLUDE_DIR)
mark_as_advanced(FORCE SWRESAMPLE_LIBRARIES SWRESAMPLE_INCLUDE_DIR)
check_include_file("libswresample/swresample.h" HAVE_LIBSWRESAMPLE_SWRESAMPLE_H)
set(optlibsfound "${optlibsfound} SWResample")
else(SWRESAMPLE_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} SWResample")
endif(SWRESAMPLE_LIBRARIES)
# Find the path to the ffmpeg executable # Find the path to the ffmpeg executable
find_program(FFMPEG_EXECUTABLE find_program(FFMPEG_EXECUTABLE
NAMES ffmpeg avconv NAMES ffmpeg avconv