Skip to content

Commit ffd01c4

Browse files
committed
Use system version of libfmt instead of rosfmt vendored one
1 parent 8ac97d0 commit ffd01c4

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

mqtt_client/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ elseif(${ROS_VERSION} EQUAL 1)
9292
mqtt_client_interfaces
9393
nodelet
9494
roscpp
95-
rosfmt ## For fmt::format.
9695
std_msgs
9796
topic_tools
9897
)
@@ -101,6 +100,9 @@ elseif(${ROS_VERSION} EQUAL 1)
101100
find_package(PahoMqttCpp REQUIRED)
102101
set(PahoMqttCpp_LIBRARIES PahoMqttCpp::paho-mqttpp3)
103102

103+
find_package(fmt REQUIRED)
104+
set(fmt_LIBRARIES fmt::fmt)
105+
104106

105107
## Uncomment this if the package has a setup.py. This macro ensures
106108
## modules and global scripts declared therein get installed
@@ -194,7 +196,9 @@ elseif(${ROS_VERSION} EQUAL 1)
194196
roscpp
195197
std_msgs
196198
topic_tools
197-
DEPENDS PahoMqttCpp
199+
DEPENDS
200+
fmt
201+
PahoMqttCpp
198202
)
199203

200204
###########
@@ -236,6 +240,7 @@ elseif(${ROS_VERSION} EQUAL 1)
236240
## Specify libraries to link a library or executable target against
237241
target_link_libraries(${PROJECT_NAME}
238242
${catkin_LIBRARIES}
243+
${fmt_LIBRARIES}
239244
${PahoMqttCpp_LIBRARIES}
240245
)
241246

mqtt_client/include/mqtt_client/MqttClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ SOFTWARE.
3232
#include <memory>
3333
#include <string>
3434

35+
#include <fmt/format.h>
3536
#include <mqtt_client_interfaces/IsConnected.h>
3637
#include <mqtt/async_client.h>
3738
#include <nodelet/nodelet.h>
3839
#include <ros/ros.h>
39-
#include <rosfmt/full.h> // fmt::format, fmt::join
4040
#include <topic_tools/shape_shifter.h>
4141

4242

mqtt_client/package.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<author email="bastian.lampe@rwth-aachen.de">Bastian Lampe</author>
1818
<author email="christian.wende@rwth-aachen.de">Christian Wende</author>
1919

20+
<depend>fmt</depend>
2021
<depend>mqtt_client_interfaces</depend>
2122
<depend>ros_environment</depend>
2223
<depend>std_msgs</depend>
2324

2425
<!-- ROS2 -->
2526
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake</buildtool_depend>
26-
<depend condition="$ROS_VERSION == 2">fmt</depend>
2727
<depend condition="$ROS_VERSION == 2">libpaho-mqtt-dev</depend>
2828
<depend condition="$ROS_VERSION == 2">libpaho-mqttpp-dev</depend>
2929
<depend condition="$ROS_VERSION == 2">rclcpp</depend>
@@ -35,7 +35,6 @@
3535
<depend condition="$ROS_VERSION == 1">nodelet</depend>
3636
<depend condition="$ROS_VERSION == 1">paho-mqtt-cpp</depend>
3737
<depend condition="$ROS_VERSION == 1">roscpp</depend>
38-
<depend condition="$ROS_VERSION == 1">rosfmt</depend>
3938
<depend condition="$ROS_VERSION == 1">topic_tools</depend>
4039

4140
<export>

0 commit comments

Comments
 (0)