Project

General

Profile

Statistics
| Branch: | Revision:

robobuggy / buggymaps / CMakeLists.txt @ f75a88be

History | View | Annotate | Download (3.04 KB)

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

    
4
## Find catkin macros and libraries
5
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
6
## is used, also find other catkin packages
7
find_package(catkin REQUIRED COMPONENTS
8
  roscpp
9
  rospy
10
  std_msgs
11
  buggycommon
12
)
13

    
14
find_package(Qt4 4.6 REQUIRED COMPONENTS QtCore QtGui)
15
include(${QT_USE_FILE})
16
find_package(Boost REQUIRED COMPONENTS thread)
17

    
18
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
19
link_directories(${catkin_LIBRARY_DIRS})
20

    
21

    
22
# Load components
23
set(buggymaps_HDRS
24
  src/buggymaps.h
25
)
26

    
27
set(buggymaps_SRCS
28
  src/buggymaps.cpp
29
)
30

    
31
# load QT components
32
qt4_wrap_cpp(buggymaps_MOCS ${buggymaps_HDRS})
33

    
34

    
35
catkin_package(
36
  LIBRARIES buggymaps
37
)
38

    
39
###########
40
## Build ##
41
###########
42

    
43
## Specify additional locations of header files
44
## Your package locations should be listed before other locations
45
# include_directories(include)
46
#include_directories(
47
#  ${catkin_INCLUDE_DIRS}
48
#)
49

    
50
## Declare a cpp library
51
add_library(buggymaps
52
  ${buggymaps_SRCS}
53
  ${buggymaps_MOCS}
54
)
55

    
56
target_link_libraries(buggymaps
57
  ${catkin_LIBRARIES}
58
  ${boost_LIBRARIES}
59
  ${QT_LIBRARIES}
60
)
61

    
62
## Declare a cpp executable
63
# add_executable(buggymaps_node src/buggymaps_node.cpp)
64

    
65
## Add cmake target dependencies of the executable/library
66
## as an example, message headers may need to be generated before nodes
67
# add_dependencies(buggymaps_node buggymaps_generate_messages_cpp)
68

    
69
## Specify libraries to link a library or executable target against
70
# target_link_libraries(buggymaps_node
71
#   ${catkin_LIBRARIES}
72
# )
73

    
74
#############
75
## Install ##
76
#############
77

    
78
# all install targets should use catkin DESTINATION variables
79
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
80

    
81
## Mark executable scripts (Python etc.) for installation
82
## in contrast to setup.py, you can choose the destination
83
# install(PROGRAMS
84
#   scripts/my_python_script
85
#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
86
# )
87

    
88
## Mark executables and/or libraries for installation
89
# install(TARGETS buggymaps buggymaps_node
90
#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
91
#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
92
#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
93
# )
94

    
95
## Mark cpp header files for installation
96
# install(DIRECTORY include/${PROJECT_NAME}/
97
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
98
#   FILES_MATCHING PATTERN "*.h"
99
#   PATTERN ".svn" EXCLUDE
100
# )
101

    
102
## Mark other files for installation (e.g. launch and bag files, etc.)
103
# install(FILES
104
#   # myfile1
105
#   # myfile2
106
#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
107
# )
108

    
109
install(DIRECTORY maps
110
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
111
  FILES_MATCHING PATTERN "*.png")
112

    
113
#############
114
## Testing ##
115
#############
116

    
117
## Add gtest based cpp test target and link libraries
118
# catkin_add_gtest(${PROJECT_NAME}-test test/test_buggymaps.cpp)
119
# if(TARGET ${PROJECT_NAME}-test)
120
#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
121
# endif()
122

    
123
## Add folders to be run by python nosetests
124
# catkin_add_nosetests(test)