Project

General

Profile

Statistics
| Branch: | Revision:

robobuggy / buggynav / CMakeLists.txt @ 3f5aa522

History | View | Annotate | Download (5.58 KB)

1
cmake_minimum_required(VERSION 2.8.3)
2
project(buggynav)
3

    
4
## Find catkin macros and libraries
5
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
6
## is used, also find other catkin packages
7
find_package(
8
  catkin REQUIRED COMPONENTS
9
  # When in doubt, add the package here too. 
10
  # In addition, add 'message_runtime' to catkin-depends.
11
  roscpp
12
  rospy
13
  std_msgs
14
  buggycommon
15
)
16

    
17
## System dependencies are found with CMake's conventions
18
# find_package(Boost REQUIRED COMPONENTS system)
19

    
20

    
21
## Uncomment this if the package has a setup.py. This macro ensures
22
## modules and global scripts declared therein get installed
23
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
24
# catkin_python_setup()
25

    
26
################################################
27
## Declare ROS messages, services and actions ##
28
################################################
29

    
30
## To declare and build messages, services or actions from within this
31
## package, follow these steps:
32
## * Let MSG_DEP_SET be the set of packages whose message types you use in
33
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
34
## * In the file package.xml:
35
##   * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
36
##   * If MSG_DEP_SET isn't empty the following dependencies might have been
37
##     pulled in transitively but can be declared for certainty nonetheless:
38
##     * add a build_depend tag for "message_generation"
39
##     * add a run_depend tag for "message_runtime"
40
## * In this file (CMakeLists.txt):
41
##   * add "message_generation" and every package in MSG_DEP_SET to
42
##     find_package(catkin REQUIRED COMPONENTS ...)
43
##   * add "message_runtime" and every package in MSG_DEP_SET to
44
##     catkin_package(CATKIN_DEPENDS ...)
45
##   * uncomment the add_*_files sections below as needed
46
##     and list every .msg/.srv/.action file to be processed
47
##   * uncomment the generate_messages entry below
48
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
49

    
50
## Generate messages in the 'msg' folder
51
# add_message_files(
52
#   FILES
53
#   Message1.msg
54
#   Message2.msg
55
# )
56

    
57
## Generate services in the 'srv' folder
58
# add_service_files(
59
#   FILES
60
#   Service1.srv
61
#   Service2.srv
62
# )
63

    
64
## Generate actions in the 'action' folder
65
# add_action_files(
66
#   FILES
67
#   Action1.action
68
#   Action2.action
69
# )
70

    
71
## Generate added messages and services with any dependencies listed here
72
#generate_messages(
73
#  DEPENDENCIES
74
#  std_msgs
75
#  buggymsgs
76
#)
77

    
78
###################################
79
## catkin specific configuration ##
80
###################################
81
## The catkin_package macro generates cmake config files for your package
82
## Declare things to be passed to dependent projects
83
## INCLUDE_DIRS: uncomment this if you package contains header files
84
## LIBRARIES: libraries you create in this project that dependent projects also need
85
## CATKIN_DEPENDS: catkin_packages dependent projects also need
86
## DEPENDS: system dependencies of this project that dependent projects also need
87
catkin_package(
88
#  INCLUDE_DIRS include
89
#  LIBRARIES buggynav
90
  CATKIN_DEPENDS roscpp rospy std_msgs message_runtime buggycommon
91
#  DEPENDS system_lib
92
)
93

    
94
###########
95
## Build ##
96
###########
97

    
98
## Specify additional locations of header files
99
## Your package locations should be listed before other locations
100
# include_directories(include)
101
include_directories(
102
  ${catkin_INCLUDE_DIRS}
103
)
104

    
105
## Declare a cpp library
106
# add_library(buggynav
107
#   src/${PROJECT_NAME}/buggynav.cpp
108
# )
109

    
110
## Declare a cpp executable
111
# add_executable(buggynav_node src/buggynav_node.cpp)
112

    
113
# Add teleop executable
114
add_executable(teleop src/teleop_nav.cpp)
115
target_link_libraries(teleop ${catkin_LIBRARIES})
116
add_dependencies(teleop buggycommon_generate_messages_cpp)
117

    
118
# Add Path-Following executable
119
add_executable(waypoints 
120
  src/waypoint_nav.cpp 
121
  src/waypoint_nav.h)
122
target_link_libraries(waypoints ${catkin_LIBRARIES})
123
add_dependencies(waypoints buggycommon_generate_messages_cpp)
124

    
125
## Add cmake target dependencies of the executable/library
126
## as an example, message headers may need to be generated before nodes
127
# add_dependencies(buggynav_node buggynav_generate_messages_cpp)
128

    
129
## Specify libraries to link a library or executable target against
130
# target_link_libraries(buggynav_node
131
#   ${catkin_LIBRARIES}
132
# )
133

    
134
#############
135
## Install ##
136
#############
137

    
138
# all install targets should use catkin DESTINATION variables
139
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
140

    
141
## Mark executable scripts (Python etc.) for installation
142
## in contrast to setup.py, you can choose the destination
143
# install(PROGRAMS
144
#   scripts/my_python_script
145
#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
146
# )
147

    
148
## Mark executables and/or libraries for installation
149
# install(TARGETS buggynav buggynav_node
150
#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
151
#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
152
#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
153
# )
154

    
155
## Mark cpp header files for installation
156
# install(DIRECTORY include/${PROJECT_NAME}/
157
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
158
#   FILES_MATCHING PATTERN "*.h"
159
#   PATTERN ".svn" EXCLUDE
160
# )
161

    
162
## Mark other files for installation (e.g. launch and bag files, etc.)
163
# install(FILES
164
#   # myfile1
165
#   # myfile2
166
#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
167
# )
168

    
169
#############
170
## Testing ##
171
#############
172

    
173
## Add gtest based cpp test target and link libraries
174
# catkin_add_gtest(${PROJECT_NAME}-test test/test_buggynav.cpp)
175
# if(TARGET ${PROJECT_NAME}-test)
176
#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
177
# endif()
178

    
179
## Add folders to be run by python nosetests
180
# catkin_add_nosetests(test)