Files
DriverLIdar/plugins/CMakeLists.txt
loctv f02d81c031 refactor: rename driver_sick_code plugin to driver_sick_tim
The driver targets the SICK TiM 5xx/7xx family over CoLa-A; "code" described
neither the devices nor the protocol. driver_id stays sick_tim_driver.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 06:21:45 +07:00

30 lines
1.2 KiB
CMake

# Driver plugins. Every plugin is a self-contained MODULE library named
# <dir>.so (no "lib" prefix), exporting exactly the two C entry points
# declared in include/lidar_interface.hpp. Plugins land in build/plugins/.
set(XLIDAR_PLUGIN_OUTPUT_DIR ${CMAKE_BINARY_DIR}/plugins)
set(XLIDAR_PLUGIN_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common)
# xlidar_add_plugin(<name> <sources...>) — shared boilerplate for one plugin.
function(xlidar_add_plugin name)
add_library(${name} MODULE ${ARGN})
set_target_properties(${name} PROPERTIES
PREFIX "" # driver_olei.so, not libdriver_olei.so
LIBRARY_OUTPUT_DIRECTORY ${XLIDAR_PLUGIN_OUTPUT_DIR}
CXX_VISIBILITY_PRESET hidden # only the two entry points are visible
VISIBILITY_INLINES_HIDDEN ON
POSITION_INDEPENDENT_CODE ON
)
target_include_directories(${name} PRIVATE
${CMAKE_SOURCE_DIR}/include
${XLIDAR_PLUGIN_COMMON_DIR}
)
target_link_libraries(${name} PRIVATE Threads::Threads)
endfunction()
add_subdirectory(driver_olei)
add_subdirectory(driver_sick_tim)
add_subdirectory(driver_sick_safety)
add_subdirectory(driver_espe)
add_subdirectory(driver_rplidar)