Skip to content

Commit

Permalink
[cmake] Add a FootstepPlanner CMake component
Browse files Browse the repository at this point in the history
Allows to use:
```cmake
find_package(baseline_walking_controller REQUIRED COMPONENTS FootstepPlanner)
```

To ensure the FootstepPlanner component is built in
BaselineWalkingController
  • Loading branch information
gergondet committed Oct 18, 2023
1 parent 5ad8f2d commit c1252b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.10)

set(PROJECT_NAME baseline_walking_controller)
set(PROJECT_GENERATED_HEADERS_SKIP_DEPRECATED ON)
Expand Down
2 changes: 2 additions & 0 deletions src/states/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ if(${baseline_footstep_planner_FOUND})
else()
target_link_libraries(FootstepPlannerState PUBLIC baseline_footstep_planner::BaselineFootstepPlanner ${CONTROLLER_NAME})
endif()
file(WRITE "${PROJECT_BINARY_DIR}/generated/FootstepPlannerConfig.cmake" "set(baseline_walking_controller_FootstepPlanner_FOUND TRUE)")
install(FILES "${PROJECT_BINARY_DIR}/generated/FootstepPlannerConfig.cmake" DESTINATION "${CONFIG_INSTALL_DIR}")
else()
message("-- Not build FootstepPlannerState as baseline_footstep_planner not found")
endif()
Expand Down

0 comments on commit c1252b7

Please sign in to comment.