obs-studio/plugins/linux-v4l2/CMakeLists.txt
fryshorts d6f65be966 Add libv4l2 as requirement for the v4l2 plugin.
In order to convert formats not natively supported by obs the
v4l2 userspace library is required. This patch adds a cmake
script to find the library.
2014-07-26 19:29:08 +02:00

26 lines
486 B
CMake

include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
find_package(Libv4l2)
if(NOT LIBV4L2_FOUND)
message(STATUS "libv4l2 not found, disabling v4l2 plugin")
return()
endif()
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
set(linux-v4l2_SOURCES
linux-v4l2.c
v4l2-input.c
)
add_library(linux-v4l2 MODULE
${linux-v4l2_SOURCES}
)
target_link_libraries(linux-v4l2
libobs
${LIBV4L2_LIBRARIES}
)
install_obs_plugin(linux-v4l2)
install_obs_plugin_data(linux-v4l2 data)