generated from wessel/boilerplate
feat(database_node): Add database writer node
This commit is contained in:
@@ -5,6 +5,18 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
|
||||
|
||||
# external packages
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
tomlplusplus
|
||||
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
|
||||
GIT_TAG v3.4.0
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(tomlplusplus)
|
||||
|
||||
# find dependencies
|
||||
find_package(ament_cmake REQUIRED)
|
||||
find_package(rclcpp REQUIRED)
|
||||
@@ -28,9 +40,30 @@ ament_target_dependencies(position_speed_approximator_node
|
||||
geometry_msgs
|
||||
)
|
||||
|
||||
add_executable(database_handler_node
|
||||
src/g2_2025_database_node/Main.cpp
|
||||
src/g2_2025_database_node/nodes/DatabaseHandlerNode.cpp
|
||||
src/database/DatabaseManager.cpp
|
||||
src/config/ConfigManager.cpp
|
||||
)
|
||||
|
||||
target_include_directories(database_handler_node PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/g2_2025_database_node
|
||||
)
|
||||
|
||||
target_link_libraries(database_handler_node tomlplusplus::tomlplusplus pqxx pq)
|
||||
|
||||
ament_target_dependencies(database_handler_node
|
||||
rclcpp
|
||||
sensor_msgs
|
||||
geometry_msgs
|
||||
)
|
||||
|
||||
# Install the executable
|
||||
install(TARGETS
|
||||
position_speed_approximator_node
|
||||
database_handler_node
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
find_package(rclcpp REQUIRED)
|
||||
|
||||
Reference in New Issue
Block a user