forked from peteflorence/nanomap_ros
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
68 lines (53 loc) · 1.71 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
cmake_minimum_required(VERSION 2.8.3)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
project(nanomap_ros)
## 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
visualization_msgs
nav_msgs
roscpp
std_msgs
std_srvs
tf
tf2
cv_bridge
image_transport
message_generation
sensor_msgs
pcl_ros
)
find_package( Eigen3 REQUIRED )
find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)
include_directories ( src )
include_directories( ${EIGEN3_INCLUDE_DIR} )
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
catkin_package(
)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_definitions("-std=c++11")
find_package(orocos_kdl REQUIRED)
find_library(OROCOS_KDL orocos-kdl)
set(orocos_kdl_LIBRARIES ${OROCOS_KDL})
add_library( nanomap_ros src/nanomap.cc src/pose_manager.cc src/structured_point_cloud_chain.cc src/fov_evaluator.cc src/nanomap_visualizer.cc)
target_link_libraries( nanomap_ros ${catkin_LIBRARIES} ${PCL_LIBRARIES} orocos-kdl)
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(${PROJECT_NAME}-test
test/test_nanomap.cpp
)
target_link_libraries(${PROJECT_NAME}-test
${PROJECT_NAME}
${catkin_LIBRARIES}
${GCOV_LIBRARY}
)
endif() # CATKIN_ENABLE_TESTING
add_executable( benchmarking_node example_nodes/benchmarking_node.cpp )
target_link_libraries( benchmarking_node nanomap_ros ${catkin_LIBRARIES} ${PCL_LIBRARIES} orocos-kdl)
add_executable( visualization_node example_nodes/visualization_node.cpp )
target_link_libraries( visualization_node nanomap_ros ${catkin_LIBRARIES} ${PCL_LIBRARIES} orocos-kdl)