1
- cmake_minimum_required (VERSION 2.8.3 )
1
+ cmake_minimum_required (VERSION 3.0.2 )
2
2
project ( sptam )
3
3
4
4
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR} /cmake-modules)
5
5
6
- # declare cache entry parameters
7
- SET (SHOW_TRACKED_FRAMES OFF CACHE BOOL "Enable/Disable OpenCV frame visualization for the tracker." )
8
- SET (SHOW_PROFILING ON CACHE BOOL "Enable/Disable Profiling of each step." )
9
-
10
- if ( SHOW_TRACKED_FRAMES )
11
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHOW_TRACKED_FRAMES" )
12
- endif ()
13
-
14
- if ( SHOW_PROFILING )
15
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHOW_PROFILING" )
16
- endif ()
6
+ # include macros for program options
7
+ include ( options )
17
8
18
9
## Find catkin macros and libraries
19
10
find_package ( catkin REQUIRED COMPONENTS
@@ -27,9 +18,13 @@ find_package( catkin REQUIRED COMPONENTS
27
18
image_geometry
28
19
pcl_ros
29
20
nav_msgs
30
- tf_conversions
21
+ tf2
22
+ tf2_geometry_msgs
23
+ tf2_ros
31
24
image_transport
25
+ nodelet
32
26
)
27
+ include_directories (${catkin_INCLUDE_DIRS} )
33
28
34
29
# Find Boost Library
35
30
find_package (Boost COMPONENTS thread system regex REQUIRED)
@@ -40,22 +35,20 @@ find_package(PkgConfig)
40
35
pkg_check_modules(YamlCpp yaml-cpp)
41
36
42
37
# Find OpenCV library
43
- find_package (OpenCV REQUIRED)
44
-
45
- # Find PCL library
46
- find_package (PCL 1.7 REQUIRED)
47
- include_directories (${PCL_INCLUDE_DIRS} )
48
- link_directories (${PCL_LIBRARY_DIRS} )
49
- add_definitions (${PCL_DEFINITIONS} )
38
+ FIND_PACKAGE (OpenCV REQUIRED) # OpenCV 3
39
+ #FIND_PACKAGE(OpenCV 2 REQUIRED) # OpenCV 2
40
+ include_directories (${OpenCV_INCLUDE_DIRS} )
50
41
51
42
# Find Suitesparse library
52
43
find_package (SuiteSparse REQUIRED)
44
+ include_directories (${CSPARSE_INCLUDE_DIR} )
53
45
include_directories (${CHOLMOD_INCLUDE_DIR} )
54
46
55
47
# Find G2O Library
56
48
find_package (G2O REQUIRED)
57
49
# select required components
58
- SET (G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE} ${G2O_SOLVER_CSPARSE_EXTENSION} ${G2O_TYPES_SBA} )
50
+ SET (G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE} ${G2O_SOLVER_CSPARSE_EXTENSION} ${G2O_TYPES_SBA} ${G2O_TYPES_SLAM3D} )
51
+ include_directories (${G2O_INCLUDE_DIR} )
59
52
60
53
###################################
61
54
## catkin specific configuration ##
@@ -69,10 +62,11 @@ SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE}
69
62
catkin_package(
70
63
# INCLUDE_DIRS include
71
64
# LIBRARIES sptam
72
- CATKIN_DEPENDS roscpp std_msgs sensor_msgs geometry_msgs cv_bridge message_filters image_geometry pcl_ros nav_msgs tf_conversions
65
+ CATKIN_DEPENDS roscpp std_msgs sensor_msgs geometry_msgs cv_bridge message_filters image_geometry pcl_ros nav_msgs tf2 tf2_geometry_msgs tf2_ros nodelet
73
66
# DEPENDS system_lib
74
67
)
75
68
69
+
76
70
###########
77
71
## Build ##
78
72
###########
@@ -87,6 +81,7 @@ set( SPTAM_LIBRARIES
87
81
${catkin_LIBRARIES}
88
82
${G2O_LIBRARIES}
89
83
${SUITESPARSE_LIBRARIES}
84
+ ${CHOLMOD_LIBRARIES}
90
85
${YamlCpp_LIBRARIES}
91
86
cxsparse
92
87
sptam
0 commit comments