yolobs-studio/plugins/linux-v4l2/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
972 B
CMake
Raw Normal View History

2016-02-23 23:16:51 +00:00
project(linux-v4l2)
if(DISABLE_V4L2)
message(STATUS "v4l2 plugin disabled")
return()
endif()
2020-10-01 20:15:25 +00:00
if(ENABLE_V4L2)
find_package(Libv4l2 REQUIRED)
else()
find_package(Libv4l2)
if(NOT LIBV4L2_FOUND)
message(STATUS "libv4l2 not found, disabling v4l2 plugin")
return()
endif()
2016-02-23 23:16:51 +00:00
endif()
2020-10-01 20:15:25 +00:00
if(DISABLE_UDEV)
2016-02-23 23:16:51 +00:00
add_definitions(-DHAVE_UDEV)
2020-10-01 20:15:25 +00:00
else()
find_package(UDev)
if(NOT UDEV_FOUND)
message(STATUS "udev disabled for v4l2 plugin")
else()
set(linux-v4l2-udev_SOURCES
v4l2-udev.c
)
endif()
2016-02-23 23:16:51 +00:00
endif()
include_directories(
SYSTEM "${CMAKE_SOURCE_DIR}/libobs"
${LIBV4L2_INCLUDE_DIRS}
)
set(linux-v4l2_SOURCES
linux-v4l2.c
2020-03-25 08:07:22 +00:00
v4l2-controls.c
2016-02-23 23:16:51 +00:00
v4l2-input.c
v4l2-helpers.c
2020-12-22 17:32:50 +00:00
v4l2-output.c
2016-02-23 23:16:51 +00:00
${linux-v4l2-udev_SOURCES}
)
add_library(linux-v4l2 MODULE
${linux-v4l2_SOURCES}
)
target_link_libraries(linux-v4l2
libobs
${LIBV4L2_LIBRARIES}
${UDEV_LIBRARIES}
)
2020-10-01 20:15:25 +00:00
set_target_properties(linux-v4l2 PROPERTIES FOLDER "plugins")
2016-02-23 23:16:51 +00:00
install_obs_plugin_with_data(linux-v4l2 data)