diff --git a/topic_tools/CMakeLists.txt b/topic_tools/CMakeLists.txt
index 24b372f..fec002f 100644
--- a/topic_tools/CMakeLists.txt
+++ b/topic_tools/CMakeLists.txt
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.8)
project(topic_tools)
+find_package(rclcpp REQUIRED)
+find_package(rclcpp_components REQUIRED)
+find_package(topic_tools_interfaces REQUIRED)
+
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
@@ -9,26 +13,18 @@ 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_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-ament_python_install_package(${PROJECT_NAME}
- SETUP_CFG
- ${PROJECT_NAME}/setup.cfg
- SCRIPTS_DESTINATION
- lib/${PROJECT_NAME}
-)
+include_directories(include)
-ament_auto_add_library(relay_node SHARED
+add_library(relay_node SHARED
src/relay_node.cpp
src/tool_base_node.cpp
)
+ament_target_dependencies(relay_node rclcpp rclcpp_components)
target_compile_definitions(relay_node PRIVATE "TOPIC_TOOLS_BUILDING_LIBRARY")
rclcpp_components_register_nodes(relay_node "topic_tools::RelayNode")
-ament_auto_add_executable(relay
+add_executable(relay
src/relay.cpp
)
@@ -36,15 +32,16 @@ target_link_libraries(relay
relay_node
)
-ament_auto_add_library(throttle_node SHARED
+add_library(throttle_node SHARED
src/throttle_node.cpp
src/tool_base_node.cpp
)
+ament_target_dependencies(throttle_node rclcpp rclcpp_components)
target_compile_definitions(throttle_node PRIVATE "TOPIC_TOOLS_BUILDING_LIBRARY")
rclcpp_components_register_nodes(throttle_node "topic_tools::ThrottleNode")
-ament_auto_add_executable(throttle
+add_executable(throttle
src/throttle.cpp
)
@@ -52,15 +49,16 @@ target_link_libraries(throttle
throttle_node
)
-ament_auto_add_library(drop_node SHARED
+add_library(drop_node SHARED
src/drop_node.cpp
src/tool_base_node.cpp
)
+ament_target_dependencies(drop_node rclcpp rclcpp_components)
target_compile_definitions(drop_node PRIVATE "TOPIC_TOOLS_BUILDING_LIBRARY")
rclcpp_components_register_nodes(drop_node "topic_tools::DropNode")
-ament_auto_add_executable(drop
+add_executable(drop
src/drop.cpp
)
@@ -68,15 +66,16 @@ target_link_libraries(drop
drop_node
)
-ament_auto_add_library(mux_node SHARED
+add_library(mux_node SHARED
src/mux_node.cpp
src/tool_base_node.cpp
)
+ament_target_dependencies(mux_node rclcpp rclcpp_components topic_tools_interfaces)
target_compile_definitions(mux_node PRIVATE "TOPIC_TOOLS_BUILDING_LIBRARY")
rclcpp_components_register_nodes(mux_node "topic_tools::MuxNode")
-ament_auto_add_executable(mux
+add_executable(mux
src/mux.cpp
)
@@ -84,15 +83,16 @@ target_link_libraries(mux
mux_node
)
-ament_auto_add_library(demux_node SHARED
+add_library(demux_node SHARED
src/demux_node.cpp
src/tool_base_node.cpp
)
+ament_target_dependencies(demux_node rclcpp rclcpp_components topic_tools_interfaces)
target_compile_definitions(demux_node PRIVATE "TOPIC_TOOLS_BUILDING_LIBRARY")
rclcpp_components_register_nodes(demux_node "topic_tools::DemuxNode")
-ament_auto_add_executable(demux
+add_executable(demux
src/demux.cpp
)
@@ -100,15 +100,16 @@ target_link_libraries(demux
demux_node
)
-ament_auto_add_library(delay_node SHARED
+add_library(delay_node SHARED
src/delay_node.cpp
src/tool_base_node.cpp
)
+ament_target_dependencies(delay_node rclcpp rclcpp_components)
target_compile_definitions(delay_node PRIVATE "TOPIC_TOOLS_BUILDING_LIBRARY")
rclcpp_components_register_nodes(delay_node "topic_tools::DelayNode")
-ament_auto_add_executable(delay
+add_executable(delay
src/delay.cpp
)
@@ -181,7 +182,12 @@ if(BUILD_TESTING)
)
endif()
-ament_auto_package(
- INSTALL_TO_SHARE
- launch
+install(TARGETS relay_node relay throttle_node throttle drop_node drop mux_node mux demux_node demux delay_node delay
+ DESTINATION lib/${PROJECT_NAME}
)
+
+install(DIRECTORY launch
+ DESTINATION share/${PROJECT_NAME}
+)
+
+ament_package()
diff --git a/topic_tools/package.xml b/topic_tools/package.xml
index c01acd6..40bc762 100644
--- a/topic_tools/package.xml
+++ b/topic_tools/package.xml
@@ -11,7 +11,6 @@
ROS Tooling Working Group
Apache License 2.0
- ament_cmake_auto
ament_cmake_python
rosidl_default_generators
diff --git a/topic_tools_interfaces/CMakeLists.txt b/topic_tools_interfaces/CMakeLists.txt
index 5cf3d36..731471f 100644
--- a/topic_tools_interfaces/CMakeLists.txt
+++ b/topic_tools_interfaces/CMakeLists.txt
@@ -11,8 +11,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(rosidl_default_generators REQUIRED)
+find_package(builtin_interfaces REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"srv/DemuxAdd.srv"
@@ -32,4 +32,4 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()
-ament_auto_package()
+ament_package()
diff --git a/topic_tools_interfaces/package.xml b/topic_tools_interfaces/package.xml
index cfe9efa..d88f6c5 100644
--- a/topic_tools_interfaces/package.xml
+++ b/topic_tools_interfaces/package.xml
@@ -8,7 +8,6 @@
ROS Tooling Working Group
Apache License 2.0
- ament_cmake_auto
rosidl_default_generators