-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
73 lines (61 loc) · 2.01 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
cmake_minimum_required(VERSION 2.8)
set(OpenCV_DIR /opt/opencv344/share/OpenCV)
project(Slam14)
set(CMAKE_CXX_STANDARD 14)
#指定Sophus package路径
set(Sophus_DIR ch4/useSophus/Sophus/build )
#list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/ch6/g2o_curve_fitting/cmake_modules)
find_package(Sophus REQUIRED)
include_directories(${Sophus_INCLUDE_DIRS})
#OpenCV路径
find_package(OpenCV 3.4 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
message(STATUS "路径:${OpenCV_INCLUDE_DIRS}")
#PCL路径
find_package(PCL REQUIRED COMPONENTS common io)
include_directories(${PCL_INCLUDE_DIRS})
add_definitions(${PCL_DEFINITIONS})
#Ceres路径
find_package( Ceres REQUIRED )
include_directories( ${CERES_INCLUDE_DIRS} )
#g2o路径
find_package( G2O REQUIRED )
include_directories(
${G2O_INCLUDE_DIRS}
# "/usr/include/eigen3"
)
include_directories(ch3/useEigen)
#add_executable(Slam14 main.cpp ch3/useEigen/eigenMatrix.cpp ch3/useEigen/eigenMatrix.h)
#
#add_executable(useGeometry ch3/useGeometry/useGeometry.cpp ch3/useGeometry/useGeometry.h)
#
#add_executable(ch3_exercise ch3/ch3_exercise.cpp)
#
#
#add_executable(useSophus ch4/useSophus/useSophus.cpp)
#target_link_libraries(useSophus ${Sophus_LIBRARIES})
#
#
#
#
#add_executable(imageBasics ch5/imageBasics.cpp)
#target_link_libraries(imageBasics ${OpenCV_LIBS})
#
#
#
##set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/ch5)
#add_executable(joinMap ch5/joinMap.cpp)
#target_link_libraries(joinMap ${OpenCV_LIBS} ${PCL_LIBRARIES})
#
#
#
#add_executable(curve_fitting ch6/ceres_curve_fitting/main.cpp)
#target_link_libraries(curve_fitting ${OpenCV_LIBS} ${CERES_LIBRARIES})
#
#
#add_executable(g2o_curve_fitting ch6/g2o_curve_fitting/main.cpp)
#target_link_libraries(g2o_curve_fitting ${OpenCV_LIBS} g2o_core g2o_stuff)
add_executable(feature_extraction ch7/feature/feature_extraction.cpp)
target_link_libraries(feature_extraction ${OpenCV_LIBS})
add_executable(pose_estimation ch7/feature/pose_estimation_2d2d.cpp)
target_link_libraries(pose_estimation ${OpenCV_LIBS})