Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use system version of libfmt instead of rosfmt vendored one on ROS 1 #63

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions mqtt_client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ elseif(${ROS_VERSION} EQUAL 1)
mqtt_client_interfaces
nodelet
roscpp
rosfmt ## For fmt::format.
std_msgs
topic_tools
)
Expand All @@ -101,6 +100,9 @@ elseif(${ROS_VERSION} EQUAL 1)
find_package(PahoMqttCpp REQUIRED)
set(PahoMqttCpp_LIBRARIES PahoMqttCpp::paho-mqttpp3)

find_package(fmt REQUIRED)
set(fmt_LIBRARIES fmt::fmt)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
Expand Down Expand Up @@ -194,7 +196,9 @@ elseif(${ROS_VERSION} EQUAL 1)
roscpp
std_msgs
topic_tools
DEPENDS PahoMqttCpp
DEPENDS
fmt
PahoMqttCpp
)

###########
Expand Down Expand Up @@ -236,6 +240,7 @@ elseif(${ROS_VERSION} EQUAL 1)
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${fmt_LIBRARIES}
${PahoMqttCpp_LIBRARIES}
)

Expand Down
2 changes: 1 addition & 1 deletion mqtt_client/include/mqtt_client/MqttClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ SOFTWARE.
#include <memory>
#include <string>

#include <fmt/format.h>
#include <mqtt_client_interfaces/IsConnected.h>
#include <mqtt/async_client.h>
#include <nodelet/nodelet.h>
#include <ros/ros.h>
#include <rosfmt/full.h> // fmt::format, fmt::join
#include <topic_tools/shape_shifter.h>


Expand Down
3 changes: 1 addition & 2 deletions mqtt_client/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<author email="bastian.lampe@rwth-aachen.de">Bastian Lampe</author>
<author email="christian.wende@rwth-aachen.de">Christian Wende</author>

<depend>fmt</depend>
<depend>mqtt_client_interfaces</depend>
<depend>ros_environment</depend>
<depend>std_msgs</depend>

<!-- ROS2 -->
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake</buildtool_depend>
<depend condition="$ROS_VERSION == 2">fmt</depend>
<depend condition="$ROS_VERSION == 2">libpaho-mqtt-dev</depend>
<depend condition="$ROS_VERSION == 2">libpaho-mqttpp-dev</depend>
<depend condition="$ROS_VERSION == 2">rclcpp</depend>
Expand All @@ -35,7 +35,6 @@
<depend condition="$ROS_VERSION == 1">nodelet</depend>
<depend condition="$ROS_VERSION == 1">paho-mqtt-cpp</depend>
<depend condition="$ROS_VERSION == 1">roscpp</depend>
<depend condition="$ROS_VERSION == 1">rosfmt</depend>
<depend condition="$ROS_VERSION == 1">topic_tools</depend>

<export>
Expand Down
Loading