-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
75 lines (67 loc) · 1.76 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
cmake_minimum_required(VERSION 2.8.3)
project(htmap)
# Catkin dependencies
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
sensor_msgs
image_transport
cv_bridge
geometry_msgs
obindex
)
# System dependencies
find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem)
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Defining the package
catkin_package(
INCLUDE_DIRS include
LIBRARIES keypoint_description_htmap #htmap
CATKIN_DEPENDS
roscpp
std_msgs
sensor_msgs
image_transport
cv_bridge
geometry_msgs
obindex
DEPENDS OpenCV Boost
)
###########
## Build ##
###########
# Including directories.
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS})
# Description Library
add_library(description_htmap
src/imgdesc/KeypointDetector.cpp
src/imgdesc/KeypointDescriptor.cpp
src/imgdesc/GlobalDescriptor.cpp
src/imgdesc/ldb.cpp)
target_link_libraries(description_htmap ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
# HTMap Library
set(HTMAP_SRCS
src/bayes/BayesFilter.cpp
src/util/Params.cpp
src/util/Statistics.cpp
src/util/Util.cpp
src/map/Location.cpp
src/map/HighLevelMap.cpp
src/lc/LoopCloser.cpp
src/HTMap.cpp
)
add_library(htmap ${HTMAP_SRCS})
target_link_libraries(htmap description_htmap ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${Boost_LIBRARIES})
# HTMap Node
add_executable(htmap_node src/nodes/HTMap_node.cpp)
target_link_libraries(htmap_node htmap)