-
Notifications
You must be signed in to change notification settings - Fork 60
/
CMakeLists.txt
89 lines (72 loc) · 1.81 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
86
87
88
89
cmake_minimum_required(VERSION 2.8.3)
project(reflector_ekf_slam)
add_compile_options(-std=c++11)
SET(CMAKE_BUILD_TYPE Release)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
option(GPS ON)
if(GPS)
message("You are using an unfinished EKF module !!!!!!!!!!!!")
add_definitions(-DUSE_GPS)
else()
message("You are using a stable EKF module !!!!!!!!!!!!")
endif()
set(PACKAGE_DEPENDENCIES
visualization_msgs
nav_msgs
geometry_msgs
roscpp
roslib
sensor_msgs
std_msgs
pcl_ros
pcl_conversions
)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS ${PACKAGE_DEPENDENCIES})
find_package(Glog REQUIRED)
find_package(Ceres REQUIRED COMPONENTS SuiteSparse)
# find_package(CAIRO REQUIRED cairo>=1.12.16)
include(FindPkgConfig)
PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16)
find_package(Eigen3 REQUIRED)
find_package(PCL 1.7 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
if (NOT GLOG_FOUND)
message(FATAL_ERROR "Glog not found. Install Glog from the command line using the command(s) -\
sudo apt-get install libgoogle-glog-dev libgflags-dev")
endif (NOT GLOG_FOUND)
add_service_files(
FILES
save_map.srv
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(CATKIN_DEPENDS
${PACKAGE_DEPENDENCIES}
DEPENDS
PCL
EIGEN3
)
include_directories(
${catkin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${GLOG_INCLUDE_DIR}
${CERES_INCLUDE_DIRS}
${CAIRO_INCLUDE_DIRS}
)
file(GLOB_RECURSE ALL_LIBRARY_HDRS "include/*.h")
file(GLOB_RECURSE ALL_LIBRARY_SRCS "src/*.cc" "src/*.cpp")
add_executable(slam_node
${ALL_LIBRARY_HDRS} ${ALL_LIBRARY_SRCS})
target_link_libraries(slam_node
${catkin_LIBRARIES}
${PCL_LIBRARIES}
glog
${CERES_LIBRARIES}
${CAIRO_LIBRARIES}
)