remove option to build with no ffmpeg (#2365)
This commit is contained in:
parent
a029909972
commit
893048c306
252
CMakeLists.txt
252
CMakeLists.txt
|
@ -186,8 +186,6 @@ set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING
|
|||
set(ZM_NO_MMAP "OFF" CACHE BOOL
|
||||
"Set to ON to not use mmap shared memory. Shouldn't be enabled unless you
|
||||
experience problems with the shared memory. default: OFF")
|
||||
set(ZM_NO_FFMPEG "OFF" CACHE BOOL
|
||||
"Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF")
|
||||
set(ZM_NO_LIBVLC "OFF" CACHE BOOL
|
||||
"Set to ON to skip libvlc checks and force building ZM without libvlc. default: OFF")
|
||||
set(ZM_NO_CURL "OFF" CACHE BOOL
|
||||
|
@ -518,141 +516,137 @@ endif(MP4V2_LIBRARIES)
|
|||
|
||||
set(PATH_FFMPEG "")
|
||||
set(OPT_FFMPEG "no")
|
||||
# Do not check for ffmpeg if ZM_NO_FFMPEG is on
|
||||
if(NOT ZM_NO_FFMPEG)
|
||||
# avformat (using find_library and find_path)
|
||||
find_library(AVFORMAT_LIBRARIES avformat)
|
||||
if(AVFORMAT_LIBRARIES)
|
||||
set(HAVE_LIBAVFORMAT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
|
||||
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h" /usr/include/ffmpeg)
|
||||
if(AVFORMAT_INCLUDE_DIR)
|
||||
include_directories("${AVFORMAT_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
|
||||
endif(AVFORMAT_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR)
|
||||
check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H)
|
||||
set(optlibsfound "${optlibsfound} AVFormat")
|
||||
else(AVFORMAT_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVFormat")
|
||||
endif(AVFORMAT_LIBRARIES)
|
||||
# avformat (using find_library and find_path)
|
||||
find_library(AVFORMAT_LIBRARIES avformat)
|
||||
if(AVFORMAT_LIBRARIES)
|
||||
set(HAVE_LIBAVFORMAT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
|
||||
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h" /usr/include/ffmpeg)
|
||||
if(AVFORMAT_INCLUDE_DIR)
|
||||
include_directories("${AVFORMAT_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
|
||||
endif(AVFORMAT_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR)
|
||||
check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H)
|
||||
set(optlibsfound "${optlibsfound} AVFormat")
|
||||
else(AVFORMAT_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVFormat")
|
||||
endif(AVFORMAT_LIBRARIES)
|
||||
|
||||
# avcodec (using find_library and find_path)
|
||||
find_library(AVCODEC_LIBRARIES avcodec)
|
||||
if(AVCODEC_LIBRARIES)
|
||||
set(HAVE_LIBAVCODEC 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
|
||||
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h" /usr/include/ffmpeg)
|
||||
if(AVCODEC_INCLUDE_DIR)
|
||||
include_directories("${AVCODEC_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
|
||||
endif(AVCODEC_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR)
|
||||
check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H)
|
||||
set(optlibsfound "${optlibsfound} AVCodec")
|
||||
else(AVCODEC_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVCodec")
|
||||
endif(AVCODEC_LIBRARIES)
|
||||
# avcodec (using find_library and find_path)
|
||||
find_library(AVCODEC_LIBRARIES avcodec)
|
||||
if(AVCODEC_LIBRARIES)
|
||||
set(HAVE_LIBAVCODEC 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
|
||||
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h" /usr/include/ffmpeg)
|
||||
if(AVCODEC_INCLUDE_DIR)
|
||||
include_directories("${AVCODEC_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
|
||||
endif(AVCODEC_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR)
|
||||
check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H)
|
||||
set(optlibsfound "${optlibsfound} AVCodec")
|
||||
else(AVCODEC_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVCodec")
|
||||
endif(AVCODEC_LIBRARIES)
|
||||
|
||||
# avdevice (using find_library and find_path)
|
||||
find_library(AVDEVICE_LIBRARIES avdevice)
|
||||
if(AVDEVICE_LIBRARIES)
|
||||
set(HAVE_LIBAVDEVICE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
|
||||
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h" /usr/include/ffmpeg)
|
||||
if(AVDEVICE_INCLUDE_DIR)
|
||||
include_directories("${AVDEVICE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
|
||||
endif(AVDEVICE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR)
|
||||
check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H)
|
||||
set(optlibsfound "${optlibsfound} AVDevice")
|
||||
else(AVDEVICE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVDevice")
|
||||
endif(AVDEVICE_LIBRARIES)
|
||||
# avdevice (using find_library and find_path)
|
||||
find_library(AVDEVICE_LIBRARIES avdevice)
|
||||
if(AVDEVICE_LIBRARIES)
|
||||
set(HAVE_LIBAVDEVICE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
|
||||
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h" /usr/include/ffmpeg)
|
||||
if(AVDEVICE_INCLUDE_DIR)
|
||||
include_directories("${AVDEVICE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
|
||||
endif(AVDEVICE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR)
|
||||
check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H)
|
||||
set(optlibsfound "${optlibsfound} AVDevice")
|
||||
else(AVDEVICE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVDevice")
|
||||
endif(AVDEVICE_LIBRARIES)
|
||||
|
||||
# avutil (using find_library and find_path)
|
||||
find_library(AVUTIL_LIBRARIES avutil)
|
||||
if(AVUTIL_LIBRARIES)
|
||||
set(HAVE_LIBAVUTIL 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
|
||||
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h" /usr/include/ffmpeg)
|
||||
if(AVUTIL_INCLUDE_DIR)
|
||||
include_directories("${AVUTIL_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
|
||||
endif(AVUTIL_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR)
|
||||
check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H)
|
||||
check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H)
|
||||
check_include_file("libavutil/hwcontext.h" HAVE_LIBAVUTIL_HWCONTEXT_H)
|
||||
set(optlibsfound "${optlibsfound} AVUtil")
|
||||
else(AVUTIL_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVUtil")
|
||||
endif(AVUTIL_LIBRARIES)
|
||||
# avutil (using find_library and find_path)
|
||||
find_library(AVUTIL_LIBRARIES avutil)
|
||||
if(AVUTIL_LIBRARIES)
|
||||
set(HAVE_LIBAVUTIL 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
|
||||
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h" /usr/include/ffmpeg)
|
||||
if(AVUTIL_INCLUDE_DIR)
|
||||
include_directories("${AVUTIL_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
|
||||
endif(AVUTIL_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR)
|
||||
check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H)
|
||||
check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H)
|
||||
check_include_file("libavutil/hwcontext.h" HAVE_LIBAVUTIL_HWCONTEXT_H)
|
||||
set(optlibsfound "${optlibsfound} AVUtil")
|
||||
else(AVUTIL_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVUtil")
|
||||
endif(AVUTIL_LIBRARIES)
|
||||
|
||||
# swscale (using find_library and find_path)
|
||||
find_library(SWSCALE_LIBRARIES swscale)
|
||||
if(SWSCALE_LIBRARIES)
|
||||
set(HAVE_LIBSWSCALE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
|
||||
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h" /usr/include/ffmpeg)
|
||||
if(SWSCALE_INCLUDE_DIR)
|
||||
include_directories("${SWSCALE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
|
||||
endif(SWSCALE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR)
|
||||
check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H)
|
||||
set(optlibsfound "${optlibsfound} SWScale")
|
||||
else(SWSCALE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} SWScale")
|
||||
endif(SWSCALE_LIBRARIES)
|
||||
# swscale (using find_library and find_path)
|
||||
find_library(SWSCALE_LIBRARIES swscale)
|
||||
if(SWSCALE_LIBRARIES)
|
||||
set(HAVE_LIBSWSCALE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
|
||||
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h" /usr/include/ffmpeg)
|
||||
if(SWSCALE_INCLUDE_DIR)
|
||||
include_directories("${SWSCALE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
|
||||
endif(SWSCALE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR)
|
||||
check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H)
|
||||
set(optlibsfound "${optlibsfound} SWScale")
|
||||
else(SWSCALE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} SWScale")
|
||||
endif(SWSCALE_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")
|
||||
# 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")
|
||||
|
||||
# AVresample (using find_library and find_path)
|
||||
find_library(AVRESAMPLE_LIBRARIES avresample)
|
||||
if(AVRESAMPLE_LIBRARIES)
|
||||
set(HAVE_LIBAVRESAMPLE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVRESAMPLE_LIBRARIES}")
|
||||
find_path(AVRESAMPLE_INCLUDE_DIR "libavresample/avresample.h" /usr/include/ffmpeg)
|
||||
if(AVRESAMPLE_INCLUDE_DIR)
|
||||
include_directories("${AVRESAMPLE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}")
|
||||
endif(AVRESAMPLE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR)
|
||||
check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H)
|
||||
set(optlibsfound "${optlibsfound} AVResample")
|
||||
else(AVRESAMPLE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVResample")
|
||||
endif(AVRESAMPLE_LIBRARIES)
|
||||
# AVresample (using find_library and find_path)
|
||||
find_library(AVRESAMPLE_LIBRARIES avresample)
|
||||
if(AVRESAMPLE_LIBRARIES)
|
||||
set(HAVE_LIBAVRESAMPLE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVRESAMPLE_LIBRARIES}")
|
||||
find_path(AVRESAMPLE_INCLUDE_DIR "libavresample/avresample.h" /usr/include/ffmpeg)
|
||||
if(AVRESAMPLE_INCLUDE_DIR)
|
||||
include_directories("${AVRESAMPLE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}")
|
||||
endif(AVRESAMPLE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR)
|
||||
check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H)
|
||||
set(optlibsfound "${optlibsfound} AVResample")
|
||||
else(AVRESAMPLE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVResample")
|
||||
endif(AVRESAMPLE_LIBRARIES)
|
||||
|
||||
endif(SWRESAMPLE_LIBRARIES)
|
||||
endif(SWRESAMPLE_LIBRARIES)
|
||||
|
||||
# Find the path to the ffmpeg executable
|
||||
find_program(FFMPEG_EXECUTABLE
|
||||
NAMES ffmpeg avconv
|
||||
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)
|
||||
# Find the path to the ffmpeg executable
|
||||
find_program(FFMPEG_EXECUTABLE
|
||||
NAMES ffmpeg avconv
|
||||
PATH_SUFFIXES ffmpeg)
|
||||
if(FFMPEG_EXECUTABLE)
|
||||
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
|
||||
set(OPT_FFMPEG "yes")
|
||||
mark_as_advanced(FFMPEG_EXECUTABLE)
|
||||
endif(FFMPEG_EXECUTABLE)
|
||||
|
||||
# Do not check for libvlc if ZM_NO_LIBVLC is on
|
||||
if(NOT ZM_NO_LIBVLC)
|
||||
|
|
1
INSTALL
1
INSTALL
|
@ -62,7 +62,6 @@ Advanced:
|
|||
ZM_EXTRA_LIBS A list of optional libraries, separated by semicolons, e.g. ssl;theora
|
||||
ZM_MYSQL_ENGINE MySQL engine to use with database, default: InnoDB
|
||||
ZM_NO_MMAP Set to ON to not use mmap shared memory. Shouldn't be enabled unless you experience problems with the shared memory. default: OFF
|
||||
ZM_NO_FFMPEG Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF
|
||||
ZM_NO_X10 Set to ON to build ZoneMinder without X10 support. default: OFF
|
||||
ZM_PERL_MM_PARMS By default, ZoneMinder's Perl modules are installed into the Vendor folders, as defined by your installation of Perl. You can change that here. Consult Perl's MakeMaker documentation for a definition of acceptable parameters. If you set this to something that causes the modules to be installed outside Perl's normal serach path, then you will also need to set ZM_PERL_SEARCH_PATH accordingly. default: "INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1"
|
||||
ZM_PERL_SEARCH_PATH Use to add a folder to your Perl's search path. This will need to be set in cases where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are installed outside Perl's default search path. default: ""
|
||||
|
|
Loading…
Reference in New Issue