forked from dan-riley/marble_mapping
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
101 lines (82 loc) · 2.34 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
cmake_minimum_required(VERSION 2.8)
project(marble_mapping)
set(PACKAGE_DEPENDENCIES
roscpp
visualization_msgs
sensor_msgs
pcl_ros
pcl_conversions
nav_msgs
std_msgs
std_srvs
octomap_ros
octomap_msgs
dynamic_reconfigure
nodelet
message_generation
rough_octomap
)
find_package(catkin REQUIRED COMPONENTS ${PACKAGE_DEPENDENCIES})
find_package(octomap REQUIRED)
add_definitions(-DOCTOMAP_NODEBUGOUT)
find_package(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_CFLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
include_directories(
include
${catkin_INCLUDE_DIRS}
${OCTOMAP_INCLUDE_DIRS}
)
generate_dynamic_reconfigure_options(cfg/MarbleMapping.cfg)
add_message_files(
FILES
OctomapArray.msg
OctomapNeighbors.msg
)
generate_messages(
DEPENDENCIES
octomap_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS ${PACKAGE_DEPENDENCIES}
DEPENDS OCTOMAP
)
set(LINK_LIBS
${OCTOMAP_LIBRARIES}
${catkin_LIBRARIES}
)
add_library(${PROJECT_NAME} src/MarbleMapping.cpp)
target_link_libraries(${PROJECT_NAME} ${LINK_LIBS})
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp)
add_executable(marble_mapping_node src/marble_mapping_node.cpp)
target_link_libraries(marble_mapping_node ${PROJECT_NAME} ${LINK_LIBS})
# Nodelet
add_library(marble_mapping_nodelet src/marble_mapping_nodelet.cpp)
target_link_libraries(marble_mapping_nodelet ${PROJECT_NAME} ${LINK_LIBS})
add_executable(compare_octomaps src/compare_octomaps.cpp)
target_link_libraries(compare_octomaps ${PROJECT_NAME} ${LINK_LIBS})
# install targets:
install(TARGETS ${PROJECT_NAME}
marble_mapping_node
marble_mapping_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
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
)
install(FILES
nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)