Skip to content

Commit

Permalink
chore: update cmake files (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
  • Loading branch information
ktro2828 committed Aug 14, 2024
1 parent 426ae06 commit 5461fb4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source install/setup.bash

```shell
# run awviz
ros2 run awviz awviz
awviz
```

## Plugin Customization
Expand Down
8 changes: 0 additions & 8 deletions awviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@ endif()

# -------- find dependencies --------
find_package(ament_cmake_auto REQUIRED)
find_package(rerun_sdk REQUIRED)
find_package(awviz_common REQUIRED)
ament_auto_find_build_dependencies()

# -------- add executable --------
add_executable(${PROJECT_NAME} src/main.cpp)
target_link_libraries(${PROJECT_NAME} awviz_common::awviz_common)

# -------- install executable --------
install(TARGETS ${PROJECT_NAME}
DESTINATION bin
DESTINATION lib/${PROJECT_NAME}
)

# -------- for testing --------
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions awviz/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<depend>rclcpp</depend>
<depend>awviz_common</depend>
<depend>rerun_sdk</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
2 changes: 0 additions & 2 deletions awviz_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ endif()

# -------- find dependencies --------
find_package(ament_cmake_auto REQUIRED)
find_package(rclcpp REQUIRED)
find_package(pluginlib REQUIRED)
ament_auto_find_build_dependencies()

# -------- fetch contents --------
Expand Down
2 changes: 0 additions & 2 deletions awviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ endif()

# -------- find dependencies --------
find_package(ament_cmake_auto REQUIRED)
find_package(rerun_sdk REQUIRED)
find_package(awviz_common REQUIRED)
ament_auto_find_build_dependencies()

# -------- link targets --------
Expand Down
9 changes: 7 additions & 2 deletions awviz_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,16 @@ project(my_custom_display)
# -------- find dependencies --------
find_package(ament_cmake_auto REQUIRED)
# ... OTHER OPERATIONS
ament_auto_find_build_dependencies()
# -------- link targets --------
add_library(${PROJECT_NAME} SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/foo.cpp)
# ... OTHER OPERATIONS
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(${PROJECT_NAME} awviz_common::awviz_common rerun_sdk)
ament_target_dependencies(${PROJECT_NAME} rclcpp my_custom_msgs)
# -------- export plugin description --------
pluginlib_export_plugin_description_file(awviz_common plugin_description.xml)
Expand Down
1 change: 1 addition & 0 deletions awviz_plugin/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<depend>awviz_common</depend>
<depend>cv_bridge</depend>
<depend>pluginlib</depend>
<depend>rerun_sdk</depend>
<depend>sensor_msgs</depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down

0 comments on commit 5461fb4

Please sign in to comment.