cmvr-es/cmvr-es/service/grpc/CMakeLists.txt

121 lines
3.3 KiB
CMake

add_library(service
stop_all/src/stop_operation_dispatcher.cpp
action/src/action_queue_executor.cpp
server/src/camera_ptz_activity_registry.cpp
server/src/media_activity_coordinator.cpp
server/src/motor_activity_coordinator.cpp
server/src/grpc_camera_service.cpp
server/src/grpc_command_transaction.cpp
server/src/grpc_error_logging_interceptor.cpp
server/src/grpc_recovery_audit.cpp
server/src/grpc_safety_proto.cpp
server/src/grpc_safety_participants.cpp
server/src/grpc_security.cpp
server/src/grpc_system_service.cpp
server/src/grpc_speaker_service.cpp
server/src/grpc_microphone_service.cpp
server/src/grpc_head_service.cpp
server/src/grpc_dexhand_service.cpp
server/src/grpc_arm_service.cpp
server/src/grpc_arm_teleop_service.cpp
server/src/grpc_robot_arm_teleop_backend.cpp
server/src/grpc_motor_service.cpp
server/src/grpc_agv_service.cpp
server/src/grpc_hlc_service.cpp
../../task/grpc_server_task/src/grpc_server_task.cpp
)
target_include_directories(service PUBLIC
${CMAKE_SOURCE_DIR}/cmvr-es
)
target_link_libraries(service PRIVATE
cmvr_es::proto
cmvr_es::stop_all_admission_gate
cmvr_es::camera_operational_activity_registry
osqp
cmvr_es::control_authority_manager
cmvr_es::device_manager
cmvr_es::task_manager
cmvr_es::algorithms::controller
cmvr_es::task
cmvr_es::media_source_manager
cmvr_es::device_media_source_adapter
protobuf::libprotobuf
)
add_library(cmvr_es::service ALIAS service)
install(TARGETS service LIBRARY DESTINATION lib)
if(BUILD_TESTING)
add_executable(grpc_camera_stream_policy_test
server/tests/grpc_camera_stream_policy_test.cpp
)
target_include_directories(grpc_camera_stream_policy_test
PRIVATE
${CMAKE_SOURCE_DIR}/cmvr-es
)
add_test(
NAME grpc_camera_stream_policy_test
COMMAND grpc_camera_stream_policy_test
)
set_tests_properties(grpc_camera_stream_policy_test PROPERTIES TIMEOUT 10)
endif()
# --------------------------------------------------------
# Unit test
# --------------------------------------------------------
find_package(OpenCV REQUIRED)
include_directories(
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/include
)
link_directories(
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/lib
)
add_executable(grpc_arm_client_test
server/tests/grpc_arm_client_test.cpp
)
target_link_libraries(grpc_arm_client_test
PRIVATE
cmvr_es::device::canbus
cmvr_es::device::ti5_canopen_motor_driver
osqp
gtest
gtest_main
pthread
glog
cmvr_es::proto
ccd
fcl
cmvr_es::device_manager
${OpenCV_LIBS}
)
add_executable(grpc_hlc_client_test
server/tests/grpc_hlc_client_test.cpp
)
target_link_libraries(grpc_hlc_client_test
PRIVATE
cmvr_es::device::canbus
cmvr_es::device::ti5_canopen_motor_driver
osqp
gtest
gtest_main
pthread
glog
cmvr_es::proto
ccd
fcl
cmvr_es::device_manager
)