Project

General

Profile

Statistics
| Branch: | Revision:

robobuggy / buggysim / CMakeLists.txt @ dd5d7f53

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 buggymsgs)
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

    
23
generate_messages(DEPENDENCIES std_msgs std_srvs)
24

    
25
catkin_package(CATKIN_DEPENDS message_runtime buggymsgs std_msgs std_srvs)
26

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

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

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

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

    
47

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

    
54

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

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

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

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