52 lines
1.1 KiB
CMake
52 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(costmap_2d)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
# ---- Dependencies ----
|
|
find_package(Eigen3 REQUIRED)
|
|
find_package(Boost REQUIRED COMPONENTS system thread)
|
|
|
|
include_directories(
|
|
include
|
|
${EIGEN3_INCLUDE_DIRS}
|
|
${Boost_INCLUDE_DIRS}
|
|
/usr/include
|
|
)
|
|
|
|
add_definitions(${EIGEN3_DEFINITIONS})
|
|
|
|
# ---- Core costmap_2d library ----
|
|
add_library(costmap_2d
|
|
src/array_parser.cpp
|
|
src/costmap_2d.cpp
|
|
src/observation_buffer.cpp
|
|
src/layer.cpp
|
|
src/layered_costmap.cpp
|
|
# src/costmap_math.cpp
|
|
src/footprint.cpp
|
|
# src/costmap_layer.cpp
|
|
)
|
|
|
|
target_link_libraries(costmap_2d
|
|
${Boost_LIBRARIES}
|
|
)
|
|
|
|
# # ---- Layer plugins ----
|
|
add_library(layers
|
|
plugins/inflation_layer.cpp
|
|
# plugins/obstacle_layer.cpp
|
|
# plugins/static_layer.cpp
|
|
# plugins/voxel_layer.cpp
|
|
)
|
|
|
|
target_link_libraries(layers
|
|
costmap_2d
|
|
${Boost_LIBRARIES}
|
|
)
|
|
|
|
# ---- Example Executable ----
|
|
# add_executable(test_costmap main.cpp)
|
|
# target_link_libraries(test_costmap costmap_2d layers)
|