forked from clearpathrobotics/occupancy_grid_utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
73 lines (63 loc) · 2.16 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
cmake_minimum_required(VERSION 2.8.3)
project(occupancy_grid_utils)
## 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
sensor_msgs laser_geometry cv_bridge
tf geometry_msgs pcl_ros pcl_conversions
tf2_bullet roscpp std_msgs message_generation
message_runtime nav_msgs
)
## Add find-modules and define external dependencies
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(Boost REQUIRED COMPONENTS system signals python)
find_package(Eigen3 REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(Bullet REQUIRED)
## Generate messages in the 'msg' folder
add_message_files(
FILES
OverlayClouds.msg
NavigationFunction.msg
LocalizedCloud.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
geometry_msgs
sensor_msgs
nav_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES grid_utils grid_utils_boost_python_exports
CATKIN_DEPENDS nav_msgs geometry_msgs sensor_msgs laser_geometry roscpp rospy map_server tf
DEPENDS system_lib
)
include_directories(include)
include_directories(${catkin_INCLUDE_DIRS})
include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${Eigen_INCLUDE_DIRS})
include_directories(${BULLET_INCLUDE_DIR})
# Build
add_library(grid_utils
src/ray_tracer.cpp
src/grid_overlay.cpp
src/shortest_path.cpp
src/coordinate_conversions.cpp
src/combine_grids.cpp
src/geometry.cpp
src/file.cpp
)
add_dependencies(grid_utils occupancy_grid_utils_generate_messages_cpp)
target_link_libraries(grid_utils SDL SDL_image ${catkin_LIBRARIES})
add_executable(grid_construction_node
src/examples/grid_construction_node.cpp)
add_dependencies(grid_construction_node occupancy_grid_utils_generate_messages_cpp)
target_link_libraries(grid_construction_node
grid_utils ${catkin_LIBRARIES})
# Python stuff
add_library(grid_utils_boost_python_exports src/boost_python_exports.cpp)
target_link_libraries(grid_utils_boost_python_exports grid_utils ${PYTHON_LIBRARIES} ${catkin_LIBRARIES})