Skip to content

Commit

Permalink
Revamp nav2_util CMakeLists.txt to use modern idioms. (ros-navigation…
Browse files Browse the repository at this point in the history
…#4393)

This commit does a number of things:

1.  Switches to using target_link_libraries everywhere.
This gives us finer-grained control over what dependencies
are exported to downstream as public, or private.  In the
particular case of nav2_util, this actually doesn't matter
*too* much, but it will help for other packages.
2.  Moves the include directory down one level to
include/${PROJECT_NAME}, which is best practice in ROS 2
since Humble.
3.  Makes sure to export nav2_util as a CMake target, so
downstream users of it can use that target.
4.  Moves the base_footprint_publisher.hpp header file into
the src directory, as it isn't functionality that an external
project could use.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored and Marc-Morcos committed Jul 4, 2024
1 parent ab94a3d commit 2555222
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 131 deletions.
129 changes: 0 additions & 129 deletions nav2_util/include/nav2_util/base_footprint_publisher.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion nav2_util/src/base_footprint_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <memory>

#include "nav2_util/base_footprint_publisher.hpp"
#include "base_footprint_publisher.hpp"

int main(int argc, char ** argv)
{
Expand Down
2 changes: 1 addition & 1 deletion nav2_util/test/test_base_footprint_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string>
#include <memory>

#include "nav2_util/base_footprint_publisher.hpp"
#include "base_footprint_publisher.hpp"
#include "gtest/gtest.h"
#include "tf2/exceptions.h"

Expand Down

0 comments on commit 2555222

Please sign in to comment.