Add automatic finding of the ffmpeg executable to cmake

This commit is contained in:
Kfir Itzhak 2013-11-15 11:11:33 +02:00
parent 82a92639ca
commit 4a4018b8d7
1 changed files with 11 additions and 0 deletions

View File

@ -225,6 +225,8 @@ else(MYSQLCLIENT_LIBRARIES)
message(FATAL_ERROR "zm requires mysqlclient but it was not found on your system") message(FATAL_ERROR "zm requires mysqlclient but it was not found on your system")
endif(MYSQLCLIENT_LIBRARIES) endif(MYSQLCLIENT_LIBRARIES)
set(PATH_FFMPEG "")
set(OPT_FFMPEG "no")
# Do not check for ffmpeg if ZM_NO_FFMPEG is on # Do not check for ffmpeg if ZM_NO_FFMPEG is on
if(NOT ZM_NO_FFMPEG) if(NOT ZM_NO_FFMPEG)
# avformat (using find_library and find_path) # avformat (using find_library and find_path)
@ -312,6 +314,15 @@ if(NOT ZM_NO_FFMPEG)
else(SWSCALE_LIBRARIES) else(SWSCALE_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} SWScale") set(optlibsnotfound "${optlibsnotfound} SWScale")
endif(SWSCALE_LIBRARIES) endif(SWSCALE_LIBRARIES)
# Find the path to the ffmpeg executable
find_program(FFMPEG_EXECUTABLE ffmpeg PATH_SUFFIXES ffmpeg)
if(FFMPEG_EXECUTABLE)
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
set(OPT_FFMPEG "yes")
mark_as_advanced(FFMPEG_EXECUTABLE)
endif(FFMPEG_EXECUTABLE)
endif(NOT ZM_NO_FFMPEG) endif(NOT ZM_NO_FFMPEG)
# *** END OF LIBRARY CHECKS *** # *** END OF LIBRARY CHECKS ***