Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)

## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation)

## Declare ROS messages and services
add_message_files(DIRECTORY msg FILES Num.msg)
Expand All @@ -13,6 +13,14 @@ add_service_files(DIRECTORY srv FILES AddTwoInts.srv)
generate_messages(DEPENDENCIES std_msgs)

## Declare a catkin package
catkin_package()
catkin_package(
INCLUDE_DIRS include
LIBRARIES beginner_tutorials
CATKIN_DEPENDS message_runtime roscpp rospy std_msgs
DEPENDS system_lib
)

# %EndTag(FULLTEXT)%
## Specify additional locations of header files
include_directories(${catkin_INCLUDE_DIRS})

# %EndTag(FULLTEXT)%
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ add_service_files(FILES AddTwoInts.srv)
generate_messages(DEPENDENCIES std_msgs)

## Declare a catkin package
catkin_package()
catkin_package(
INCLUDE_DIRS include
LIBRARIES beginner_tutorials
CATKIN_DEPENDS message_runtime roscpp rospy std_msgs
DEPENDS system_lib
)

## Build talker and listener
include_directories(include ${catkin_INCLUDE_DIRS})
## Specify additional locations of header files
include_directories(${catkin_INCLUDE_DIRS})

## Build talker and listener
add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)
Expand Down