Skip to content

Commit e2db26f

Browse files
quning18fengqikai1414
authored andcommitted
apollo-platform: add rt link options into roscpp
so that we don't need to link rt with each applications.
1 parent a1f7ef4 commit e2db26f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ros/ros_comm/roscpp/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ target_link_libraries(roscpp
163163
fastrtps
164164
fastcdr
165165
yaml-cpp
166+
-lrt
166167
)
167168

168169
add_library(shm_manager SHARED
@@ -214,8 +215,8 @@ install(FILES transport_mode.yaml
214215
add_executable(talker test_node/talker.cpp)
215216
add_executable(listener test_node/listener.cpp)
216217

217-
target_link_libraries(talker ${catkin_LIBRARIES} ${PROJECT_NAME} -lrt)
218-
target_link_libraries(listener ${catkin_LIBRARIES} ${PROJECT_NAME} -lrt)
218+
target_link_libraries(talker ${catkin_LIBRARIES} ${PROJECT_NAME})
219+
target_link_libraries(listener ${catkin_LIBRARIES} ${PROJECT_NAME})
219220

220221
install(TARGETS talker
221222
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}

0 commit comments

Comments
 (0)