2025-09-10 19:51:34 -04:00
|
|
|
option(ENABLE_LIB_livoxProto1 "Enable Livox Protocol v1 backend lib" ON)
|
2025-09-05 00:08:25 -04:00
|
|
|
|
|
|
|
|
if(ENABLE_LIB_livoxProto1)
|
|
|
|
|
add_library(livoxProto1 SHARED
|
|
|
|
|
livoxProto1.cpp
|
2025-09-06 20:06:38 -04:00
|
|
|
core.cpp
|
|
|
|
|
device.cpp
|
|
|
|
|
protocol.cpp
|
2025-09-06 08:50:07 -04:00
|
|
|
broadcastListener.cpp
|
2025-10-22 06:17:42 -04:00
|
|
|
udpCommandDemuxer.cpp
|
2025-09-05 00:08:25 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Set config define for header generation
|
|
|
|
|
add_compile_definitions(CONFIG_LIB_LIVOXPROTO1_ENABLED)
|
|
|
|
|
target_include_directories(livoxProto1 PUBLIC ${Boost_INCLUDE_DIRS})
|
2025-11-04 00:22:25 -04:00
|
|
|
target_link_libraries(livoxProto1 PUBLIC
|
|
|
|
|
Boost::system Boost::log
|
|
|
|
|
attachmentSupport)
|
2025-11-03 22:18:45 -04:00
|
|
|
|
|
|
|
|
# Verify Boost dynamic dependencies after build
|
|
|
|
|
add_custom_command(TARGET livoxProto1 POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -DVERIFY_FILE="$<TARGET_FILE:livoxProto1>"
|
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/cmake/VerifyBoostDynamic.cmake
|
|
|
|
|
COMMENT "Verifying Boost dynamic dependencies for livoxProto1"
|
|
|
|
|
)
|
2025-09-05 00:08:25 -04:00
|
|
|
|
|
|
|
|
# Install rules
|
|
|
|
|
install(TARGETS livoxProto1 DESTINATION lib)
|
|
|
|
|
endif()
|