cmake_dependent_option(ENABLE_XV "Enable XV support."${ENABLE_X11_DEFAULT_VALUE}"ENABLE_FFMPEG;UNIX" NO)
cmake_dependent_option(ENABLE_THEORA "Enable theora video codec support." YES "ENABLE_VIDEO" NO)
...
...
@@ -180,6 +181,12 @@ if(ENABLE_FFMPEG)
else()
add_definitions(-DNO_FFMPEG)
endif()
if(ENABLE_V4L)
find_package(V4L)
if(NOT V4L_FOUND)
message(FATAL_ERROR "Missing V4L. It is highly recommended to build with libv4l2 headers and library. Many camera will won't work or will crash your application if libv4l2 is not installed. If you know what you are doing, you can use -DENABLE_V4L=0 to disable this check.")