Project

General

Profile

Statistics
| Branch: | Revision:

robobuggy / buggysim / CMakeLists.txt @ 3f5aa522

History | View | Annotate | Download (2.5 KB)

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

    
4
find_package(catkin REQUIRED COMPONENTS message_generation roscpp roslib rosconsole std_msgs std_srvs rostime roscpp_serialization buggycommon)
5

    
6
find_package(Qt4 4.6 REQUIRED COMPONENTS QtCore QtGui)
7
include(${QT_USE_FILE})
8
find_package(Boost REQUIRED COMPONENTS thread)
9

    
10
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
11
link_directories(${catkin_LIBRARY_DIRS})
12

    
13
add_message_files(DIRECTORY msg FILES 
14
                  Velocity.msg)
15
#                  Color.msg Pose.msg Velocity.msg)
16
add_service_files(DIRECTORY srv FILES
17
                  Kill.srv
18
                  SetPen.srv
19
                  Spawn.srv
20
                  TeleportAbsolute.srv
21
                  TeleportRelative.srv)
22
generate_messages(DEPENDENCIES std_msgs std_srvs)
23

    
24
catkin_package(CATKIN_DEPENDS message_runtime buggycommon std_msgs std_srvs)
25

    
26
# Set up the dependencies for turtlesim_node
27
set(turtlesim_node_SRCS
28
  src/buggysim.cpp
29
  src/buggy.cpp
30
  src/sim_frame.cpp
31
)
32

    
33
set(turtlesim_node_HDRS
34
  include/buggysim/sim_frame.h
35
)
36

    
37
# apparently this is just what you do with QT
38
qt4_wrap_cpp(buggysim_node_MOCS ${turtlesim_node_HDRS})
39

    
40
# Build the turtlesim node?
41
# note the ${buggysim_node_MOCS}. this uses the variable we just set. 
42
add_executable(buggysim_node ${turtlesim_node_SRCS} ${buggysim_node_MOCS})
43
target_link_libraries(buggysim_node ${QT_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
44
add_dependencies(buggysim_node turtlesim_gencpp)
45

    
46

    
47
# Build the teleop...thing. I thought it was a package, 
48
#  it obviously isn't
49
add_executable(buggy_teleop_key tutorials/teleop_turtle_key.cpp)
50
target_link_libraries(buggy_teleop_key ${catkin_LIBRARIES})
51
add_dependencies(buggy_teleop_key turtlesim_gencpp)
52

    
53

    
54
# Build draw_square. so many words
55
add_executable(buggy_draw_square tutorials/draw_square.cpp)
56
target_link_libraries(buggy_draw_square ${catkin_LIBRARIES} ${Boost_LIBRARIES})
57
add_dependencies(buggy_draw_square turtlesim_gencpp)
58

    
59
# but these words I know, it spawns a turtle that does follor the leader
60
add_executable(buggy_mimic tutorials/mimic.cpp)
61
target_link_libraries(buggy_mimic ${catkin_LIBRARIES})
62
add_dependencies(buggy_mimic turtlesim_gencpp)
63

    
64
# Install the built executables
65
install(TARGETS buggysim_node buggy_teleop_key buggy_draw_square buggy_mimic
66
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
67

    
68
# Install the images into the correct folder.
69
install(DIRECTORY images
70
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
71
  FILES_MATCHING PATTERN "*.png")