Project

General

Profile

Statistics
| Branch: | Revision:

robobuggy / buggyvis / CMakeLists.txt @ f75a88be

History | View | Annotate | Download (1.83 KB)

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

    
4
find_package(catkin REQUIRED COMPONENTS message_generation roscpp roslib 
5
  rosconsole std_msgs std_srvs rostime roscpp_serialization 
6
  buggymsgs buggymaps)
7

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

    
12
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
13
link_directories(${catkin_LIBRARY_DIRS})
14

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

    
22
generate_messages(DEPENDENCIES std_msgs std_srvs)
23

    
24
catkin_package(CATKIN_DEPENDS message_runtime buggymsgs buggymaps std_msgs std_srvs)
25

    
26
# Set up the dependencies for turtlesim_node
27
set(buggyvis_node_SRCS
28
  src/buggy.cpp
29
  src/buggyvis.cpp
30
  src/vis_frame.cpp
31
)
32

    
33
set(buggyvis_node_HDRS
34
  include/buggyvis/vis_frame.h
35
)
36

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

    
40
# Build the buggyvis node?
41
# note the ${buggysim_node_MOCS}. this uses the variable we just set. 
42
add_executable(vis ${buggyvis_node_SRCS} ${buggyvis_node_MOCS})
43
target_link_libraries(vis ${QT_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
44
#add_dependencies(vis buggymsgs_gencpp)
45

    
46
# but these words I know, it spawns a turtle that does follor the leader
47
#add_executable(buggy_mimic tutorials/mimic.cpp)
48
#target_link_libraries(buggy_mimic ${catkin_LIBRARIES})
49
#add_dependencies(buggy_mimic buggyvis_gencpp)
50

    
51
# Install the built executables
52
install(TARGETS vis 
53
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
54

    
55
# Install the images into the correct folder.
56
install(DIRECTORY images
57
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
58
  FILES_MATCHING PATTERN "*.png")