forked from CIFASIS/sptam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (57 loc) · 1.73 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
cmake_minimum_required(VERSION 3.0.2)
project( sptam )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
# include macros for program options
include( options )
# include finds for common program dependencies
include( dependencies )
# Build the sptam library
add_subdirectory( src/sptam )
# build unit tests
enable_testing()
add_subdirectory( src/tests )
# When building with ROS
if( CATKIN_DEVEL_PREFIX )
set(BUILDING_ROS ON)
add_definitions(-DBUILDING_ROS)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
cmake_modules
std_msgs
sensor_msgs
geometry_msgs
cv_bridge
message_filters
image_geometry
pcl_ros
nav_msgs
tf2
tf2_geometry_msgs
tf2_ros
image_transport
nodelet
)
include_directories(${catkin_INCLUDE_DIRS})
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
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
# DEPENDS system_lib
)
###########
## Build ##
###########
# Build the sptam node
add_subdirectory( src/ros )
# When building standalone
else() # CATKIN_DEVEL_PREFIX
add_subdirectory( src/standAlone )
endif() # CATKIN_DEVEL_PREFIX