-
Notifications
You must be signed in to change notification settings - Fork 17
/
CMakeLists.txt
84 lines (73 loc) · 1.87 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
cmake_minimum_required(VERSION 2.8.3)
project(uav_frontier_exploration_3d)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
roscpp
rospy
std_msgs
tf
visualization_msgs
message_generation
pcl_ros
pcl_conversions
dynamic_reconfigure
geographic_msgs
octomap_msgs
octomap_ros
nodelet
mean_shift_clustering
)
find_package(Boost)
find_package(PCL 1.8 REQUIRED COMPONENTS
common
sample_consensus
io
ros
segmentation
filters)
find_package(octomap 1.7 REQUIRED)
add_definitions(-DOCTOMAP_NODEBUGOUT)
find_package(cmake_modules REQUIRED)
generate_messages(
DEPENDENCIES
std_msgs
geographic_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES frontier_exploration_3d
CATKIN_DEPENDS octomap_ros pcl_ros
DEPENDS octomap PCL)
include_directories(
include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${OCTOMAP_INCLUDE_DIRS}
)
link_directories(
${PCL_LIBRARY_DIRS})
add_definitions(
${PCL_DEFINITIONS})
set(LINK_LIBS
${OCTOMAP_LIBRARIES}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_library(frontier_exploration_3d
src/FrontierServer.cpp)
target_link_libraries(frontier_exploration_3d ${LINK_LIBS} yaml-cpp)
add_executable(frontier_server_node src/FrontierServerNode.cpp src/OctomapServer.cpp src/BestFrontier.cpp)
target_link_libraries(frontier_server_node frontier_exploration_3d ${LINK_LIBS})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
PATTERN ".svn" EXCLUDE
)