cmake_minimum_required(VERSION 4.2) project(j7s_zenoh_bridge) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() # find dependencies find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rclcpp_components REQUIRED) find_package(fmt REQUIRED) find_package(zenohc) find_package(zenohcxx) add_library(zenoh_bridge_component SHARED src/ZenohBridge.cpp) target_include_directories(zenoh_bridge_component PUBLIC $ $) target_link_libraries(zenoh_bridge_component rclcpp::rclcpp rclcpp_components::component zenohcxx::zenohc fmt::fmt ) rclcpp_components_register_node(zenoh_bridge_component PLUGIN "j7s::ZenohBridge" EXECUTABLE zenoh_bridge ) add_library(zenoh_router_component SHARED src/ZenohRouter.cpp) target_include_directories(zenoh_router_component PUBLIC $ $) target_link_libraries(zenoh_router_component rclcpp::rclcpp rclcpp_components::component zenohcxx::zenohc fmt::fmt ) rclcpp_components_register_node(zenoh_router_component PLUGIN "j7s::ZenohRouter" EXECUTABLE zenoh_router ) add_executable(get_default_config src/bin/get_default_config.cpp ) target_link_libraries(get_default_config zenohcxx::zenohc fmt::fmt ) ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET) install(TARGETS zenoh_bridge_component zenoh_router_component get_default_config EXPORT export_${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) # Install launch and param files. install(DIRECTORY launch params DESTINATION share/${PROJECT_NAME}/ ) ament_package()