Project

General

Profile

Statistics
| Branch: | Revision:

robobuggy / buggysim / CMakeLists.txt @ f75a88be

History | View | Annotate | Download (2.53 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 buggymsgs buggymaps)
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

    
17
add_service_files(DIRECTORY srv FILES
18
                  Kill.srv
19
                  SetPen.srv
20
                  Spawn.srv
21
                  TeleportAbsolute.srv
22
                  TeleportRelative.srv)
23

    
24
generate_messages(DEPENDENCIES std_msgs std_srvs)
25

    
26
catkin_package(CATKIN_DEPENDS message_runtime buggymsgs buggymaps std_msgs std_srvs)
27

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

    
35
set(turtlesim_node_HDRS
36
  include/buggysim/sim_frame.h
37
)
38

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

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

    
48

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

    
55

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

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

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

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