Files
hayodea e7b7a311f7 Add lcameraBuff Stage 2 plugin with YUV attach and unit tests.
Introduce params parsing, pixel/format decisions, capture layout, shared
YuvStimProducer per camera, and channel stimulus buffers with attach flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 11:03:19 -04:00

55 lines
1.3 KiB
CMake

cmake_dependent_option(ENABLE_STIMBUFFAPI_lcameraBuff
"Enable libcamera YUV stim buff API" ON
"ENABLE_LIB_lcameraDev" OFF)
if(ENABLE_STIMBUFFAPI_lcameraBuff)
set(CONFIG_STIMBUFFAPI_LCAMERABUFF_ENABLED 1)
pkg_check_modules(LIBCAMERA REQUIRED libcamera)
add_library(lcameraBuff SHARED
lcameraBuff.cpp
lcameraBuffParams.cpp
pixelAndColorFormatDecisions.cpp
yuvCaptureLayout.cpp
yuvChannelStimulusBuffer.cpp
yuvStimProducer.cpp
)
set_target_properties(lcameraBuff PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)
target_include_directories(lcameraBuff PUBLIC
${Boost_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/smocore/include
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/commonLibs
${CMAKE_SOURCE_DIR}/commonLibs/lcameraDev
${LIBCAMERA_INCLUDE_DIRS}
)
target_link_libraries(lcameraBuff PUBLIC
Boost::system
Boost::log
attachmentSupport
spinscale
)
add_custom_command(TARGET lcameraBuff POST_BUILD
COMMAND ${CMAKE_COMMAND} -DVERIFY_FILE="$<TARGET_FILE:lcameraBuff>"
-P ${CMAKE_SOURCE_DIR}/cmake/VerifyBoostDynamic.cmake
COMMENT "Verifying Boost dynamic dependencies for lcameraBuff"
)
install(TARGETS lcameraBuff
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} NAMELINK_SKIP
)
if(ENABLE_TESTS)
add_subdirectory(tests)
endif()
endif()