robobuggy / turtlesim_ref / CMakeLists.txt @ dd5d7f53
History | View | Annotate | Download (2.3 KB)
1 |
cmake_minimum_required(VERSION 2.8.3) |
---|---|
2 |
project(turtlesim_ref) |
3 |
#project(turtlesim) |
4 |
|
5 |
find_package(catkin REQUIRED COMPONENTS message_generation roscpp roslib rosconsole std_msgs std_srvs rostime roscpp_serialization) |
6 |
|
7 |
find_package(Qt4 4.6 REQUIRED COMPONENTS QtCore QtGui) |
8 |
include(${QT_USE_FILE}) |
9 |
find_package(Boost REQUIRED COMPONENTS thread) |
10 |
|
11 |
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS}) |
12 |
link_directories(${catkin_LIBRARY_DIRS}) |
13 |
|
14 |
add_message_files(DIRECTORY msg FILES |
15 |
Color.msg Pose.msg Velocity.msg) |
16 |
|
17 |
add_service_files(DIRECTORY srv FILES |
18 |
Kill.srv |
19 |
SetPen.srv |
20 |
Spawn.srv |
21 |
TeleportAbsolute.srv |
22 |
TeleportRelative.srv) |
23 |
generate_messages(DEPENDENCIES std_msgs std_srvs) |
24 |
|
25 |
catkin_package(CATKIN_DEPENDS message_runtime std_msgs std_srvs) |
26 |
|
27 |
# Set up the dependencies for turtlesim_node |
28 |
set(turtlesim_node_SRCS |
29 |
src/turtlesim.cpp |
30 |
src/turtle.cpp |
31 |
src/turtle_frame.cpp |
32 |
) |
33 |
set(turtlesim_node_HDRS |
34 |
include/turtlesim/turtle_frame.h |
35 |
) |
36 |
|
37 |
# apparently this is just what you do with QT |
38 |
qt4_wrap_cpp(turtlesim_node_MOCS ${turtlesim_node_HDRS}) |
39 |
|
40 |
# Build the turtlesim node? |
41 |
add_executable(turtlesim_node ${turtlesim_node_SRCS} ${turtlesim_node_MOCS}) |
42 |
target_link_libraries(turtlesim_node ${QT_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) |
43 |
add_dependencies(turtlesim_node turtlesim_gencpp) |
44 |
|
45 |
|
46 |
# Build the teleop...thing. I thought it was a package, |
47 |
# it obviously isn't |
48 |
add_executable(turtle_teleop_key tutorials/teleop_turtle_key.cpp) |
49 |
target_link_libraries(turtle_teleop_key ${catkin_LIBRARIES}) |
50 |
add_dependencies(turtle_teleop_key turtlesim_ref_gencpp) |
51 |
|
52 |
|
53 |
# Build draw_square. so many words |
54 |
add_executable(draw_square tutorials/draw_square.cpp) |
55 |
target_link_libraries(draw_square ${catkin_LIBRARIES} ${Boost_LIBRARIES}) |
56 |
add_dependencies(draw_square turtlesim_ref_gencpp) |
57 |
|
58 |
# but these words I know, it spawns a turtle that does follow the leader |
59 |
add_executable(mimic tutorials/mimic.cpp) |
60 |
target_link_libraries(mimic ${catkin_LIBRARIES}) |
61 |
add_dependencies(mimic turtlesim_ref_gencpp) |
62 |
|
63 |
install(TARGETS turtlesim_node turtle_teleop_key draw_square mimic |
64 |
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) |
65 |
|
66 |
install(DIRECTORY images |
67 |
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
68 |
FILES_MATCHING PATTERN "*.png") |