forked from MIT-SPARK/Kimera-RPGO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·61 lines (50 loc) · 1.71 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
cmake_minimum_required (VERSION 3.5)
project(KimeraRPGO VERSION 1.0 LANGUAGES CXX)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
IF(APPLE)
# Fix linking on 10.14+. See https://stackoverflow.com/questions/54068035
LINK_DIRECTORIES(/usr/local/lib)
ENDIF()
###########################################################################
include(gtsam)
###########################################################################
# Find Boost
find_package(Boost REQUIRED COMPONENTS filesystem regex timer date_time program_options)
if(NOT TARGET Boost::boost)
add_library(Boost::boost INTERFACE IMPORTED)
set_target_properties(Boost::boost PROPERTIES
INTERFACE_LINK_LIBRARIES "${Boost_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
endif()
###########################################################################
# Compile
add_library(KimeraRPGO SHARED
KimeraRPGO/logger.h
KimeraRPGO/GenericSolver.cpp
KimeraRPGO/RobustSolver.cpp
KimeraRPGO/SolverParams.h )
# Add source code for max clique finder
include(KimeraRPGO/max_clique_finder/CMakeLists.txt)
# Add source for outlier rejection stuff
include(KimeraRPGO/outlier/CMakeLists.txt)
# Add source for utils
include(KimeraRPGO/utils/CMakeLists.txt)
target_link_libraries(KimeraRPGO
PUBLIC
Boost::boost
gtsam
gtsam_unstable
pthread
)
target_include_directories(KimeraRPGO
PUBLIC
${GTSAM_INCLUDE_DIR}
)
add_dependencies(KimeraRPGO gtsam)
###########################################################################
# Define executables
add_executable(RpgoReadG2o examples/RpgoReadG2o.cpp)
target_link_libraries(RpgoReadG2o KimeraRPGO)
###########################################################################