Created
November 21, 2012 22:37
-
-
Save chadrockey/4128312 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8.3) | |
project(beginner_tutorials) | |
## Find catkin and system dependencies | |
## Find catkin and any catkin packages on which | |
## this package depends at build time | |
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs) | |
## System dependencies are found with CMake's conventions | |
# find_package(Boost REQUIRED COMPONENTS system) | |
## Uncomment if the package has a setup.py | |
# catkin_python_setup() | |
## Declare ROS messages and services | |
find_package(catkin REQUIRED COMPONENTS genmsg) | |
## Generate messages in the 'msg' folder | |
add_message_files( | |
DIRECTORY msg | |
FILES | |
Num.msg | |
) | |
## Generate services in the 'srv' folder | |
add_service_files( | |
DIRECTORY srv | |
FILES | |
AddTwoInts.srv | |
) | |
## Generate added messages and services with any dependencies | |
generate_messages(DEPENDENCIES std_msgs) | |
## Declare things to be passed to other projects | |
catkin_package( | |
# INCLUDE_DIRS include | |
# LIBRARIES ${PROJECT_NAME} | |
# CATKIN_DEPENDS # catkin-pkg1 catkin-pkg2 | |
# DEPENDS Boost # other-3rd-party-libraries | |
) | |
## Specify additional locations of header files | |
# include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) | |
## Declare a cpp library | |
# add_library(${PROJECT_NAME} | |
# src/${PROJECT_NAME}/beginner_tutorials.cpp | |
# ) | |
## Declare a cpp executable | |
# add_executable(${PROJECT_NAME}_node src/beginner_tutorials_node.cpp) | |
## Add dependencies to the executable | |
# add_dependencies(${PROJECT_NAME}_node ${PROJECT_NAME}) | |
## Specify libraries to link the executable against | |
# target_link_libraries(${PROJECT_NAME}_node | |
# ${catkin_LIBRARIES} ${Boost_LIBRARIES} | |
# ) | |
## Mark executable scripts (Python etc.) for installation | |
# install(PROGRAMS | |
# scripts/my_python_script | |
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | |
# ) | |
## Mark executables and/or libraries for installation | |
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node | |
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | |
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | |
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | |
# ) | |
## Mark cpp header files for installation | |
# install(DIRECTORY include/${PROJECT_NAME}/ | |
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | |
# FILES_MATCHING PATTERN "*.h" | |
# PATTERN ".svn" EXCLUDE | |
# ) | |
## Mark other files for installation (e.g. launch and bag files, etc.) | |
# install(FILES | |
# # myfile1 | |
# # myfile2 | |
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | |
# ) | |
## Add gtest based cpp test target and link libraries | |
# catkin_add_gtest(${PROJECT_NAME}-test test/test_beginner_tutorials.cpp) | |
# if(TARGET ${PROJECT_NAME}-test) | |
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) | |
# endif() | |
## Add any nosetest based python tests | |
# catkin_add_nosetests(test) | |
add_executable(add_two_ints_server src/add_two_ints_server.cpp) | |
target_link_libraries(add_two_ints_server ${catkin_LIBRARIES}) | |
add_executable(add_two_ints_client src/add_two_ints_client.cpp) | |
target_link_libraries(add_two_ints_client ${catkin_LIBRARIES}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment