forked from RuanJY/SLAMesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·90 lines (81 loc) · 2.36 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
cmake_minimum_required(VERSION 2.8.3)
project(slamesh)
SET(CMAKE_CXX_FLAGS "-std=c++14 -Wno-deprecated-declarations -Wno-dev")
set(CMAKE_BUILD_TYPE "Release")
set(catkin_DIR /opt/ros/kinetic/share/catkin/cmake)
#ros
#add_compile_definitions(VOXBLOX)
#set(USE_VOXBLOX ON)
set(USE_VOXBLOX OFF)
if(USE_VOXBLOX)
message("USE_VOXBLOX")
find_package(catkin REQUIRED COMPONENTS
pcl_ros
roscpp
rospy
sensor_msgs
std_msgs
mesh_msgs
mesh_msgs_conversions
voxblox_msgs
)
else()
message("DONT USE_VOXBLOX")
find_package(catkin REQUIRED COMPONENTS
pcl_ros
roscpp
rospy
sensor_msgs
std_msgs
mesh_msgs
mesh_msgs_conversions
)
endif()
catkin_package()
include_directories(include ${catkin_INCLUDE_DIRS})
#pcl
find_package(PCL REQUIRED)
include_directories(include ${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
#ceres
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
#opencv in vins
#find_package(OpenCV REQUIRED)
#ictmap
#find_package(octomap REQUIRED)
#include_directories(${OCTOMAP_INCLUDE_DIRS})
#openmp
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
#mesh_msg
find_package(LVR2 2 REQUIRED)
find_package(Boost REQUIRED COMPONENTS system)
include_directories(include ${LVR2_INCLUDE_DIRS})
if(USE_VOXBLOX)
message("USE_VOXBLOX")
add_executable(slamesh
src/utility/tool.cpp
src/factor/lidarFactor.cpp
src/cell.cpp
src/map.cpp
src/slamesher_node.cpp
src/voxblox/mesh/mesher.cpp
src/voxblox/mesh/marching_cubes.cc
)
else()
message("DONT USE_VOXBLOX")
add_executable(slamesh
src/utility/tool.cpp
src/factor/lidarFactor.cpp
src/cell.cpp
src/map.cpp
src/slamesher_node.cpp
)
endif()
#target_link_libraries(slamesh ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${CERES_LIBRARIES} gflags ${GFLAGS_LIBRARY}
# ${LVR2_LIBRARIES})
target_link_libraries(slamesh ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS} ${G2O_LIBS} ${CERES_LIBRARIES} ${LVR2_LIBRARIES})