Skip to content

Commit

Permalink
feat: fix grpc error when run soccer
Browse files Browse the repository at this point in the history
  • Loading branch information
borednuna committed May 3, 2024
1 parent 39b8583 commit f0fc798
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,25 @@ add_library(${PROJECT_NAME} SHARED
"src/${PROJECT_NAME}/node/akushon_node.cpp"
)

add_library(${PROJECT_NAME}_exported SHARED
"src/${PROJECT_NAME}/action/model/action_name.cpp"
"src/${PROJECT_NAME}/action/model/action.cpp"
"src/${PROJECT_NAME}/action/model/pose.cpp"
"src/${PROJECT_NAME}/action/node/action_manager.cpp"
"src/${PROJECT_NAME}/action/node/action_node.cpp"
"src/${PROJECT_NAME}/action/process/interpolator.cpp"
"src/${PROJECT_NAME}/action/process/joint_process.cpp"
)

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)


target_include_directories(${PROJECT_NAME}_exported PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

ament_target_dependencies(${PROJECT_NAME}
ament_index_cpp
akushon_interfaces
Expand All @@ -65,6 +80,15 @@ ament_target_dependencies(${PROJECT_NAME}
tachimawari_interfaces
gRPC)

ament_target_dependencies(${PROJECT_NAME}_exported
ament_index_cpp
akushon_interfaces
rclcpp
rclcpp_action
std_msgs
tachimawari
tachimawari_interfaces)

target_link_libraries(${PROJECT_NAME}
gRPC::grpc++_reflection
gRPC::grpc++
Expand All @@ -79,6 +103,13 @@ install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "bin"
INCLUDES DESTINATION "include")

install(TARGETS ${PROJECT_NAME}_exported
EXPORT export_${PROJECT_NAME}_exported
ARCHIVE DESTINATION "lib"
LIBRARY DESTINATION "lib"
RUNTIME DESTINATION "bin"
INCLUDES DESTINATION "include")

target_compile_options(${PROJECT_NAME} PRIVATE -fPIC)

add_executable(action "src/action_main.cpp")
Expand Down Expand Up @@ -119,5 +150,5 @@ ament_export_dependencies(
tachimawari
tachimawari_interfaces)
ament_export_include_directories("include")
ament_export_libraries(${PROJECT_NAME})
ament_export_libraries(${PROJECT_NAME}_exported)
ament_package()

0 comments on commit f0fc798

Please sign in to comment.