forked from bainro/xratslam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
158 lines (127 loc) · 3.45 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
##
## Copyright 2019 - Mauro Enrique de Souza Muñoz ([email protected])
## All rights reserved.
##
## Author: Mauro Enrique de Souza Muñoz ([email protected])
##
cmake_minimum_required( VERSION 3.7.2 )
## Project.
##
project( xratslam VERSION 1.0.0 )
#New
set (CMAKE_CXX_STANDARD 11)
## External dependencies.
##
# OpenCV
find_package( OpenCV REQUIRED )
include_directories( xratslam ${OpenCV_INCLUDE_DIRS} )
include_directories( test ${OpenCV_INCLUDE_DIRS} )
# Boost
find_package( Boost REQUIRED COMPONENTS system filesystem serialization)
include_directories( xratslam ${Boost_INCLUDE_DIRS} )
## Default install directories.
##
include( GNUInstallDirs )
## Library code files.
##
add_library( xratslam SHARED
src/ratslam/visual_odometry.cpp
src/ratslam/local_view_match.cpp
src/ratslam/posecell_network.cpp
src/ratslam/experience_map.cpp
src/xratslam/Helper.cc
src/xratslam/Settings.cc
src/xratslam/Utils.cc
src/xratslam/DataReader.cc
src/xratslam/DataReaderDir.cc
src/xratslam/DataReaderVideo.cc
src/xratslam/Image.cc
src/xratslam/Odometry.cc
src/xratslam/FileOdometry.cc
src/xratslam/XVisualOdometry.cc
src/xratslam/Factory.cc
src/xratslam/localview/VisualTemplate.cc
src/xratslam/localview/VisualTemplateSet.cc
src/xratslam/localview/OriginalLV.cc
src/xratslam/localview/RecodedLV.cc
src/xratslam/posecell/PcTemplate.cc
src/xratslam/posecell/OriginalPC.cc
src/xratslam/posecell/RecodedPC.cc
src/xratslam/posecell/NoCanPC.cc
src/xratslam/Experience.cc
src/xratslam/ExperienceSet.cc
src/xratslam/ExpLink.cc
src/xratslam/ExpLinkSet.cc
src/xratslam/DataEM.cc
src/xratslam/experiencemap/OriginalEM.cc
src/xratslam/experiencemap/RecodedEM.cc
src/xratslam/Log.cc
src/xratslam/TimeLogger.cc
src/xratslam/XRatSlam.cc
)
## Include directories.
## Uses only the root directory.
##
target_include_directories( xratslam PRIVATE src )
## Enable pkg-config to use this library.
##
configure_file( xratslam.pc.in xratslam.pc @ONLY )
##############
### Properties
##
set_target_properties( xratslam PROPERTIES VERSION ${PROJECT_VERSION} )
set_target_properties( xratslam PROPERTIES SOVERSION 1 )
#################
### Install rules
# core
install(
TARGETS xratslam
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
# ratslam headers.
install(
FILES
src/ratslam/path_node.h
src/ratslam/experience_map.h
src/ratslam/utils.h
src/ratslam/visual_odometry.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ratslam
)
# xratslam headers.
install(
FILES
src/xratslam/Helper.hh
src/xratslam/Settings.hh
src/xratslam/Image.hh
src/xratslam/Odometry.hh
src/xratslam/OdometryReader.hh
src/xratslam/DataReader.hh
src/xratslam/DataReaderDir.hh
src/xratslam/DataReaderVideo.hh
src/xratslam/Chronometer.hh
src/xratslam/TimeLogger.hh
src/xratslam/Experience.hh
src/xratslam/ExperienceSet.hh
src/xratslam/ExpLink.hh
src/xratslam/ExpLinkSet.hh
src/xratslam/DataEM.hh
src/xratslam/XRatSlam.hh
src/xratslam/LocalView.hh
src/xratslam/ExperienceMap.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xratslam
)
# pkgconfig
install(
FILES ${CMAKE_BINARY_DIR}/xratslam.pc
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig
)
find_package( PkgConfig REQUIRED )
pkg_check_modules( XRATSLAM REQUIRED xratslam )
add_executable(test
test.cc
)
## External libraries.
#
target_link_libraries( xratslam ${OpenCV_LIBRARIES} )
target_link_libraries( xratslam ${Boost_LIBRARIES} )
target_link_libraries( test xratslam)